Allocating charges for communications services

ABSTRACT

A process and apparatus to facilitate communication between callers and callees in a system comprising a plurality of nodes with which callers and callees are associated is disclosed. In response to initiation of a call by a calling subscriber, a caller identifier and a callee identifier are received. Call classification criteria associated with the caller identifier are used to classify the call as a public network call or a private network call. A routing message identifying an address, on the private network, associated with the callee is produced when the call is classified as a private network call and a routing message identifying a gateway to the public network is produced when the call is classified as a public network call.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. application Ser. No.12/513,147, filed Mar. 1, 2010, which is a national phase entry ofPCT/CA2007/001956, filed Nov. 1, 2007, which claims priority to U.S.Provisional Application No. 60/856,212, filed Nov. 2, 2006, all of whichare incorporated in their entirety.

BACKGROUND OF THE INVENTION

1. Field of Invention

This invention relates to voice over IP communications and methods andapparatus for routing and billing.

2. Description of Related Art

Internet protocol (IP) telephones are typically personal computer (PC)based telephones connected within an IP network, such as the publicInternet or a private network of a large organization. These IPtelephones have installed “voice-over-IP” (VoIP) software enabling themto make and receive voice calls and send and receive information in dataand video formats.

IP telephony switches installed within the IP network enable voice callsto be made within or between IP networks, and between an IP network anda switched circuit network (SCN), such as the public switched telephonenetwork (PSTN). If the IP switch supports the Signaling System 7 (SS7)protocol, the IP telephone can also access PSTN databases.

The PSTN network typically includes complex network nodes that containall information about a local calling service area including userauthentication and call routing. The PSTN network typically aggregatesall information and traffic into a single location or node, processes itlocally and then passes it on to other network nodes, as necessary, bymaintaining route tables at the node. PSTN nodes are redundant by designand thus provide reliable service, but if a node should fail due to anearthquake or other natural disaster, significant, if not completeservice outages can occur, with no other nodes being able to take up theload.

Existing VoIP systems do not allow for high availability and resiliencyin delivering Voice Over IP based Session Initiation Protocol (SIP)Protocol service over a geographically dispersed area such as a city,region or continent. Most resiliency originates from the provision of IPbased telephone services to one location or a small number of locationssuch as a single office or network of branch offices.

SUMMARY OF THE INVENTION

In accordance with one aspect of the invention, there is provided aprocess for operating a call routing controller to facilitatecommunication between callers and callees in a system comprising aplurality of nodes with which callers and callees are associated. Theprocess involves, in response to initiation of a call by a callingsubscriber, receiving a caller identifier and a callee identifier. Theprocess also involves using call classification criteria associated withthe caller identifier to classify the call as a public network call or aprivate network call. The process further involves producing a routingmessage identifying an address, on the private network, associated withthe callee when the call is classified as a private network call. Theprocess also involves producing a routing message identifying a gatewayto the public network when the call is classified as a public networkcall.

The process may involve receiving a request to establish a call, from acall controller in communication with a caller identified by the calleeidentifier.

Using the call classification criteria may involve searching a databaseto locate a record identifying calling attributes associated with acaller identified by the caller identifier.

Locating a record may involve locating a caller dialing profilecomprising a username associated with the caller, a domain associatedwith the caller, and at least one calling attribute.

Using the call classification criteria may involve comparing callingattributes associated with the caller dialing profile with aspects ofthe callee identifier.

Comparing may involve determining whether the callee identifier includesa portion that matches an IDD associated with the caller dialingprofile.

Comparing may involve determining whether the callee identifier includesa portion that matches an NDD associated with the caller dialingprofile.

Comparing may involve determining whether the callee identifier includesa portion that matches an area code associated with the caller dialingprofile.

Comparing may involve determining whether the callee identifier has alength within a range specified in the caller dialing profile.

The process may involve formatting the callee identifier into apre-defined digit format to produce a re-formatted callee identifier.

Formatting may involve removing an international dialing digit from thecallee identifier, when the callee identifier begins with a digitmatching an international dialing digit specified by the caller dialingprofile associated with the caller.

Formatting may involve removing a national dialing digit from the calleeidentifier and prepending a caller country code to the callee identifierwhen the callee identifier begins with a national dialing digit.

Formatting may involve prepending a caller country code to the calleeidentifier when the callee identifier begins with digits identifying anarea code specified by the caller dialing profile.

Formatting may involve prepending a caller country code and an area codeto the callee identifier when the callee identifier has a length thatmatches a caller dialing number format specified by the caller dialingprofile and only one area code is specified as being associated with thecaller in the caller dialing profile.

The process may involve classifying the call as a private network callwhen the re-formatted callee identifier identifies a subscriber to theprivate network.

The process may involve determining whether the callee identifiercomplies with a pre-defined username format and if so, classifying thecall as a private network call.

The process may involve causing a database of records to be searched tolocate a direct in dial (DID) bank table record associating a publictelephone number with the reformatted callee identifier and if the DIDbank table record is found, classifying the call as a private networkcall and if a DID bank table record is not found, classifying the callas a public network call.

Producing the routing message identifying a node on the private networkmay involve setting a callee identifier in response to a usernameassociated with the DID bank table record.

Producing the routing message may involve determining whether a nodeassociated with the reformatted callee identifier is the same as a nodeassociated the caller identifier.

Determining whether a node associated with the reformatted calleeidentifier is the same as a node associated the caller identifier mayinvolve determining whether a prefix of the re-formatted calleeidentifier matches a corresponding prefix of a username associated withthe caller dialing profile.

When the node associated with the caller is not the same as the nodeassociated with the callee, the process involves producing a routingmessage including the caller identifier, the reformatted calleeidentifier and an identification of a private network node associatedwith the callee and communicating the routing message to a callcontroller.

When the node associated with the caller is the same as the nodeassociated with the callee, the process involves determining whether toperform at least one of the following: forward the call to anotherparty, block the call and direct the caller to a voicemail serverassociated with the callee.

Producing the routing message may involve producing a routing messagehaving an identification of at least one of the callee identifier, anidentification of a party to whom the call should be forwarded and anidentification of a voicemail server associated with the callee.

Producing a routing message identifying a gateway to the public networkmay involve searching a database of route records associating routeidentifiers with dialing codes to find a route record having a dialingcode having a number pattern matching at least a portion of thereformatted callee identifier.

The process may involve communicating the routing message to a callcontroller.

The process may involve searching a database of supplier recordsassociating supplier identifiers with the route identifiers to locate atleast one supplier record associated with the route identifierassociated with the route record having a dialing code having a numberpattern matching at least a portion of the reformatted calleeidentifier.

The process may involve loading a routing message buffer with thereformatted callee identifier and an identification of specific routesassociated respective ones of the supplier records associated with theroute record and loading the routing message buffer with a time valueand a timeout value.

The process may involve communicating a routing message involving thecontents of the routing message buffer to a call controller.

The process may involve causing the dialing profile to include a maximumconcurrent call value and a concurrent call count value and causing theconcurrent call count value to be incremented when the user associatedwith the dialing profile initiates a call and causing the concurrentcall count value to be decremented when a call with the user associatedwith the dialing profile is ended.

In accordance with another aspect of the invention, there is provided acall routing apparatus for facilitating communications between callersand callees in a system comprising a plurality of nodes with whichcallers and callees are associated. The apparatus includes receivingprovisions for receiving a caller identifier and a callee identifier, inresponse to initiation of a call by a calling subscriber. The apparatusalso includes classifying provisions for classifying the call as aprivate network cal or a public network call according to callclassification criteria associated with the caller identifier. Theapparatus further includes provisions for producing a routing messageidentifying an address, on the private network, associated with thecallee when the call is classified as a private network call. Theapparatus also includes provisions for producing a routing messageidentifying a gateway to the public network when the call is classifiedas a public network call.

The receiving provisions may be operably configured to receive a requestto establish a call, from a call controller in communication with acaller identified by the callee identifier.

The apparatus may further include searching provisions for searching adatabase including records associating calling attributes withsubscribers to the private network to locate a record identifyingcalling attributes associated with a caller identified by the calleridentifier.

The records may include dialing profiles each including a usernameassociated with the subscriber, an identification of a domain associatedwith the subscriber, and an identification of at least one callingattribute associated with the subscriber.

The call classification provisions may be operably configured to comparecalling attributes associated with the caller dialing profile withaspects of the callee identifier.

The calling attributes may include an international dialing digit andcall classification provisions may be operably configured to determinewhether the callee identifier includes a portion that matches an IDDassociated with the caller dialing profile.

The calling attributes may include an national dialing digit and thecall classification provisions may be operably configured to determinewhether the callee identifier includes a portion that matches an NDDassociated with the caller dialing profile.

The calling attributes may include an area code and the callclassification provisions may be operably configured to determinewhether the callee identifier includes a portion that matches an areacode associated with the caller dialing profile.

The calling attribute may include a number length range and the callclassification provisions may be operably configured to determinewhether the callee identifier has a length within a number length rangespecified in the caller dialing profile.

The apparatus may further include formatting provisions for formattingthe callee identifier into a pre-defined digit format to produce are-formatted callee identifier.

The formatting provisions may be operably configured to remove aninternational dialing digit from the callee identifier, when the calleeidentifier begins with a digit matching an international dialing digitspecified by the caller dialing profile associated with the caller.

The formatting provisions may be operably configured to remove anational dialing digit from the callee identifier and prepend a callercountry code to the callee identifier when the callee identifier beginswith a national dialing digit.

The formatting provisions may be operably configured to prepend a callercountry code to the callee identifier when the callee identifier beginswith digits identifying an area code specified by the caller dialingprofile.

The formatting provisions may be operably configured to prepend a callercountry code and area code to the callee identifier when the calleeidentifier has a length that matches a caller dialing number formatspecified by the caller dialing profile and only one area code isspecified as being associated with the caller in the caller dialingprofile.

The classifying provisions may be operably configured to classify thecall as a private network call when the re-formatted callee identifieridentifies a subscriber to the private network.

The classifying provisions may be operably configured to classify thecall as a private network call when the callee identifier complies witha pre-defined username format.

The apparatus may further include searching provisions for searching adatabase of records to locate a direct in dial (DID) bank table recordassociating a public telephone number with the reformatted calleeidentifier and the classifying provisions may be operably configured toclassify the call as a private network call when the DID bank tablerecord is found and to classify the call as a public network call when aDID bank table record is not found

The private network routing message producing provisions may be operablyconfigured to produce a routing message having a callee identifier setaccording to a username associated with the DID bank table record.

The private network routing message producing provisions may be operablyconfigured to determine whether a node associated with the reformattedcallee identifier is the same as a node associated the calleridentifier.

The private network routing provisions may include provisions fordetermining whether a prefix of the re-formatted callee identifiermatches a corresponding prefix of a username associated with the callerdialing profile.

The private network routing message producing provisions may be operablyconfigured to produce a routing message including the caller identifier,the reformatted callee identifier and an identification of a privatenetwork node associated with the callee and to communicate the routingmessage to a call controller.

The private network routing message producing provisions may be operablyconfigured to perform at least one of the following forward the call toanother party, block the call and direct the caller to a voicemailserver associated with the callee, when the node associated with thecaller is the same as the node associated with the callee.

The provisions for producing the private network routing message may beoperably configured to produce a routing message having anidentification of at least one of the callee identifier, anidentification of a party to whom the call should be forwarded and anidentification of a voicemail server associated with the callee.

The apparatus further includes provisions for communicating the routingmessage to a call controller.

The provisions for producing a public network routing messageidentifying a gateway to the public network may include provisions forsearching a database of route records associating route identifiers withdialing codes to find a route record having a dialing code having anumber pattern matching at least a portion of the reformatted calleeidentifier.

The apparatus further includes provisions for searching a database ofsupplier records associating supplier identifiers with the routeidentifiers to locate at least one supplier record associated with theroute identifier associated with the route record having a dialing codehaving a number pattern matching at least a portion of the reformattedcallee identifier.

The apparatus further includes a routing message buffer and provisionsfor loading the routing message buffer with the reformatted calleeidentifier and an identification of specific routes associatedrespective ones of the supplier records associated with the route recordand loading the routing message buffer with a time value and a timeoutvalue.

The apparatus further includes provisions for communicating a routingmessage including the contents of the routing message buffer to a callcontroller.

The apparatus further includes means for causing the dialing profile toinclude a maximum concurrent call value and a concurrent call countvalue and for causing the concurrent call count value to be incrementedwhen the user associated with the dialing profile initiates a call andfor causing the concurrent call count value to be decremented when acall with the user associated with the dialing profile is ended.

In accordance with another aspect of the invention, there is provided adata structure for access by an apparatus for producing a routingmessage for use by a call routing controller in a communications system.The data structure includes dialing profile records comprising fieldsfor associating with respective subscribers to the system, a subscriberuser name, direct-in-dial records comprising fields for associating withrespective subscriber usernames, a user domain and a direct-in-dialnumber, prefix to node records comprising fields for associating with atleast a portion of the respective subscriber usernames, a node addressof a node in the system, whereby a subscriber name can be used to find auser domain, at least a portion of the a subscriber name can be used tofind a node with which the subscriber identified by the subscriber nameis associated, and a user domain and subscriber name can be located inresponse to a direct-in-dial number.

In accordance with another aspect of the invention, there is provided adata structure for access by an apparatus for producing a routingmessage for use by a call routing controller in a communications system.The data structure includes master list records comprising fields forassociating a dialing code with respective master list identifiers andsupplier list records linked to master list records by the master listidentifiers, the supplier list records comprising fields for associatingwith a communications services supplier, a supplier id, a master listid, a route identifier and a billing rate code, whereby communicationsservices suppliers are associated with dialing codes, such that dialingcodes can be used to locate suppliers capable of providing acommunications link associated with a given dialing code.

In accordance with another aspect of the invention, there is provided amethod for determining a time to permit a communication session to beconducted. The method involves calculating a cost per unit time,calculating a first time value as a sum of a free time attributed to aparticipant in the communication session and the quotient of a fundsbalance held by the participant to the cost per unit time value andproducing a second time value in response to the first time value and abilling pattern associated with the participant, the billing patternincluding first and second billing intervals and the second time valuebeing the time to permit a communication session to be conducted.

Calculating the first time value may involve retrieving a recordassociated with the participant and obtaining from the record at leastone of the free time and the funds balance.

Producing the second time value may involve producing a remainder valuerepresenting a portion of the second billing interval remaining afterdividing the second billing interval into a difference between the firsttime value and the first billing interval.

Producing the second time value may involve setting a difference betweenthe first time value and the remainder as the second time value.

The method may further involve setting the second time value to zerowhen the remainder is greater than zero and the first time value is lessthan the free time associated with the participant.

Calculating the cost per unit time may involve locating a record in adatabase, the record comprising a markup type indicator, a markup valueand a billing pattern and setting a reseller rate equal to the sum ofthe markup value and the buffer rate.

Locating the record in a database may involve locating at least one of arecord associated with a reseller and a route associated with thereseller, a record associated with the reseller and a default resellermarkup record.

Calculating the cost per unit time value further may involve locating atleast one of an override record specifying a route cost per unit timeamount associated with a route associated with the communicationsession, a reseller record associated with a reseller of thecommunications session, the reseller record specifying a reseller costper unit time associated with the reseller for the communicationsession, a default operator markup record specifying a default cost perunit time.

The method may further involve setting as the cost per unit time the sumof the reseller rate and at least one of the route cost per unit time,the reseller cost per unit time and the default cost per unit time.

The method may further involve receiving a communication session timerepresenting a duration of the communication session and incrementing areseller balance by the product of the reseller rate and thecommunication session time.

The method may further involve receiving a communication session timerepresenting a duration of the communication session and incrementing asystem operator balance by a product of the buffer rate and thecommunication session time.

In accordance with another aspect of the invention, there is provided anapparatus for determining a time to permit a communication session to beconducted. The apparatus includes a processor circuit, a computerreadable medium coupled to the processor circuit and encoded withinstructions for directing the processor circuit to calculate a cost perunit time for the communication session, calculate a first time value asa sum of a free time attributed to a participant in the communicationsession and the quotient of a funds balance held by the participant tothe cost per unit time value and produce a second time value in responseto the first time value and a billing pattern associated with theparticipant, the billing pattern including first and second billingintervals and the second time value being the time to permit acommunication session to be conducted.

The instructions may include instructions for directing the processorcircuit to retrieve a record associated with the participant and obtainfrom the record at least one of the free time and the funds balance.

The instructions may include instructions for directing the processorcircuit to produce the second time value by producing a remainder valuerepresenting a portion of the second billing interval remaining afterdividing the second billing interval into a difference between the firsttime value and the first billing interval.

The instructions may include instructions for directing the processorcircuit to produce the second time value comprises setting a differencebetween the first time value and the remainder as the second time value.

The instructions may include instructions for directing the processorcircuit to set the second time value to zero when the remainder isgreater than zero and the first time value is less than the free timeassociated with the participant.

The instructions for directing the processor circuit to calculate thecost per unit time may include instructions for directing the processorcircuit to locate a record in a database, the record comprising a markuptype indicator, a markup value and a billing pattern and set a resellerrate equal to the sum of the markup value and the buffer rate.

The instructions for directing the processor circuit to locate therecord in a database may include instructions for directing theprocessor circuit to locate at least one of a record associated with areseller and a route associated with the reseller, a record associatedwith the reseller, and a default reseller markup record. Theinstructions for directing the processor circuit to calculate the costper unit time value may further include instructions for directing theprocessor circuit to locate at least one of an override recordspecifying a route cost per unit time amount associated with a routeassociated with the communication session, a reseller record associatedwith a reseller of the communications session, the reseller recordspecifying a reseller cost per unit time associated with the resellerfor the communication session, a default operator markup recordspecifying a default cost per unit time.

The instructions may include instructions for directing the processorcircuit to set as the cost per unit time the sum of the reseller rateand at least one of the route cost per unit time, the reseller cost perunit time and the default cost per unit time.

The instructions may include instructions for directing the processorcircuit to receive a communication session time representing a durationof the communication session and increment a reseller balance by theproduct of the reseller rate and the communication session time.

The instructions may include instructions for directing the processorcircuit to receive a communication session time representing a durationof the communication session and increment a system operator balance bya product of the buffer rate and the communication session time.

In accordance with another aspect of the invention, there is provided aprocess for attributing charges for communications services. The processinvolves determining a first chargeable time in response to acommunication session time and a pre-defined billing pattern,determining a user cost value in response to the first chargeable timeand a free time value associated with a user of the communicationsservices, changing an account balance associated with the user inresponse to a user cost per unit time. The process may further involvechanging an account balance associated with a reseller of thecommunications services in response to a reseller cost per unit time andthe communication session time and changing an account balanceassociated with an operator of the communications services in responseto an operator cost per unit time and the communication session time.

Determining the first chargeable time may involve locating at least oneof an override record specifying a route cost per unit time and billingpattern associated with a route associated with the communicationsession, a reseller record associated with a reseller of thecommunications session, the reseller record specifying a reseller costper unit time and billing pattern associated with the reseller for thecommunication session and a default record specifying a default cost perunit time and billing pattern and setting as the pre-defined billingpattern the billing pattern of the record located. The billing patternof the record located may involve a first billing interval and a secondbilling interval.

Determining the first chargeable time may involve setting the firstchargeable time equal to the first billing interval when thecommunication session time is less than or equal to the first billinginterval.

Determining the first chargeable time may involve producing a remaindervalue representing a portion of the second billing interval remainingafter dividing the second billing interval into a difference betweencommunication session time and the first interval when the communicationsession time is greater than the communication session time and settingthe first chargeable time to a difference between the communicationsession time and the remainder when the remainder is greater than zeroand setting the first chargeable time to the communication session timewhen the remainder is not greater than zero.

The process may further involve determining a second chargeable time inresponse to the first chargeable time and the free time value associatedwith the user of the communications services when the first chargeabletime is greater than or equal to the free time value associated with theuser of the communications services.

Determining the second chargeable time may involve setting the secondchargeable time to a difference between the first chargeable time.

The process may further involve resetting the free time value associatedwith the user to zero when the first chargeable time is greater than orequal to the free time value associated with the user of thecommunications services.

Changing an account balance associated with the user may involvecalculating a user cost value in response to the second chargeable timeand the user cost per unit time.

The process may further involve changing a user free cost balance inresponse to the user cost value.

The process may further involve setting the user cost to zero when thefirst chargeable time is less than the free time value associated withthe user.

The process may further involve changing a user free time balance inresponse to the first chargeable time.

In accordance with another aspect of the invention, there is provided anapparatus for attributing charges for communications services. Theapparatus includes a processor circuit, a computer readable medium incommunication with the processor circuit and encoded with instructionsfor directing the processor circuit to determine a first chargeable timein response to a communication session time and a pre-defined billingpattern, determine a user cost value in response to the first chargeabletime and a free time value associated with a user of the communicationsservices, change an account balance associated with the user in responseto a user cost per unit time.

The instructions may further include instructions for changing anaccount balance associated with a reseller of the communicationsservices in response to a reseller cost per unit time and thecommunication session time and changing an account balance associatedwith an operator of the communications services in response to anoperator cost per unit time and the communication session time.

The instructions for directing the processor circuit to determine thefirst chargeable time may further include instructions for causing theprocessor circuit to communicate with a database to locate at least oneof an override record specifying a route cost per unit time and billingpattern associated with a route associated with the communicationsession, a reseller record associated with a reseller of thecommunications session, the reseller record specifying a reseller costper unit time and billing pattern associated with the reseller for thecommunication session and a default record specifying a default cost perunit time and billing pattern and instructions for setting as thepre-defined billing pattern the billing pattern of the record located.The billing pattern of the record located may include a first billinginterval and a second billing interval.

The instructions for causing the processor circuit to determine thefirst chargeable time may include instructions for directing theprocessor circuit to set the first chargeable time equal to the firstbilling interval when the communication session time is less than orequal to the first billing interval.

The instructions for causing the processor circuit to determine thefirst chargeable time may include instructions for producing a remaindervalue representing a portion of the second billing interval remainingafter dividing the second billing interval into a difference betweencommunication session time and the first interval when the communicationsession time is greater than the communication session time andinstructions for causing the processor circuit to set the firstchargeable time to a difference between the communication session timeand the remainder when the remainder is greater than zero andinstructions for causing the processor circuit to set the firstchargeable time to the communication session time when the remainder isnot greater than zero.

The instructions may further include instructions for causing theprocessor circuit to determine a second chargeable time in response tothe first chargeable time and the free time value associated with theuser of the communications services when the first chargeable time isgreater than or equal to the free time value associated with the user ofthe communications services.

The instructions for causing the processor circuit to determine thesecond chargeable time may include instructions for causing theprocessor circuit to set the second chargeable time to a differencebetween the first chargeable time.

The instructions may further include instructions for causing theprocessor circuit to reset the free time value associated with the userto zero when the first chargeable time is greater than or equal to thefree time value associated with the user of the communications services.

The instructions for causing the processor circuit to change an accountbalance associated with the user may include instructions for causingthe processor circuit to calculate a user cost value in response to thesecond chargeable time and the user cost per unit time.

The instructions may further include instructions for causing theprocessor circuit to change a user free cost balance in response to theuser cost value.

The instructions may further include instructions for causing theprocessor circuit to set the user cost to zero when the first chargeabletime is less than the free time value associated with the user.

The instructions may further include instructions for causing theprocessor circuit to change a user free time balance in response to thefirst chargeable time.

In accordance with another aspect of the invention, there is provided acomputer readable medium encoded with codes for directing a processorcircuit to execute one or more of the methods described above and/orvariants thereof

Other aspects and features of the present invention will become apparentto those ordinarily skilled in the art upon review of the followingdescription of specific embodiments of the invention in conjunction withthe accompanying figures.

BRIEF DESCRIPTION OF THE DRAWINGS

In drawings which illustrate embodiments of the invention,

FIG. 1 is a block diagram of a system according to a first embodiment ofthe invention;

FIG. 2 is a block diagram of a caller telephone according to the firstembodiment of the invention;

FIG. 3 is a schematic representation of a SIP invite message transmittedbetween the caller telephone and a controller shown in FIG. 1;

FIG. 4 is a block diagram of a call controller shown in FIG. 1;

FIG. 5 is a flowchart of a process executed by the call controller shownin FIG. 1 ;

FIG. 6 is a schematic representation of a routing, billing and rating(RC) request message produced by the call controller shown in FIG. 1;

FIG. 7 is a block diagram of a processor circuit of a routing, billing,rating element of the system shown in FIG. 1;

FIGS. 8A-8D is a flowchart of a RC request message handler executed bythe RC processor circuit shown in FIG. 7;

FIG. 9 is a tabular representation of a dialing profile stored in adatabase accessible by the RC shown in FIG. 1;

FIG. 10 is a tabular representation of a dialing profile for a callerusing the caller telephone shown in FIG. 1;

FIG. 11 is a tabular representation of a callee profile for a calleelocated in Calgary;

FIG. 12 is a tabular representation of a callee profile for a calleelocated in London;

FIG. 13 is a tabular representation of a Direct-in-Dial (DID) bank tablerecord stored in the database shown in FIG. 1;

FIG. 14 is a tabular representation of an exemplary DID bank tablerecord for the Calgary callee referenced in FIG. 11;

FIG. 15 is a tabular representation of a routing message transmittedfrom the RC to the call controller shown in FIG. 1 ;

FIG. 16 is a schematic representation of a routing message bufferholding a routing message for routing a call to the Calgary calleereferenced in FIG. 11 ;

FIG. 17 is a tabular representation of a prefix to supernode tablerecord stored in the database shown in FIG. 1;

FIG. 18 is a tabular representation of a prefix to supernode tablerecord that would be used for the Calgary callee referenced in FIG. 11;

FIG. 19 is a tabular representation of a master list record stored in amaster list table in the database shown in FIG. 1;

FIG. 20 is a tabular representation of a populated master list record;

FIG. 21 is a tabular representation of a suppliers list record stored inthe database shown in FIG. 1;

FIG. 22 is a tabular representation of a specific supplier list recordfor a first supplier;

FIG. 23 is a tabular representation of a specific supplier list recordfor a second supplier;

FIG. 24 is a tabular representation of a specific supplier list recordfor a third supplier;

FIG. 25 is a schematic representation of a routing message, held in arouting message buffer, identifying to the controller a plurality ofpossible suppliers that may carry the call;

FIG. 26 is a tabular representation of a call block table record;

FIG. 27 is a tabular representation of a call block table record for theCalgary callee;

FIG. 28 is a tabular representation of a call forwarding table record;

FIG. 29 is a tabular representation of a call forwarding table recordspecific for the Calgary callee;

FIG. 30 is a tabular representation of a voicemail table recordspecifying voicemail parameters to enable the caller to leave avoicemail message for the callee;

FIG. 31 is a tabular representation of a voicemail table record specificto the Calgary callee;

FIG. 32 is a schematic representation of an exemplary routing message,held in a routing message buffer, indicating call forwarding numbers anda voicemail server identifier;

FIGS. 33A and 33B are respective portions of a flowchart of a processexecuted by the RC processor for determining a time to live value;

FIG. 34 is a tabular representation of a subscriber bundle table record;

FIG. 35 is a tabular representation of a subscriber bundle record forthe Vancouver caller;

FIG. 36 is a tabular representation of a bundle override table record;

FIG. 37 is a tabular representation of bundle override record for alocated master list ID;

FIG. 38 is a tabular representation of a subscriber account tablerecord;

FIG. 39 is a tabular representation of a subscriber account record forthe Vancouver caller;

FIG. 40 is a flowchart of a process for producing a second time valueexecuted by the RC processor circuit shown in FIG. 7;

FIG. 41 is a flowchart for calculating a call cost per unit time;

FIG. 42 is a tabular representation of a system operator special ratestable record;

FIG. 43 is a tabular representation of a system operator special ratestable record for a reseller named Klondike;

FIG. 44 is a tabular representation of a system operator mark-up tablerecord;

FIG. 45 is a tabular representation of a system operator mark-up tablerecord for the reseller Klondike;

FIG. 46 is a tabular representation of a default system operator mark-uptable record;

FIG. 47 is a tabular representation of a reseller special destinationstable record;

FIG. 48 is a tabular representation of a reseller special destinationstable record for the reseller Klondike;

FIG. 49 is a tabular representation of a reseller global mark-up tablerecord;

FIG. 50 is a tabular representation of a reseller global mark-up tablerecord for the reseller Klondike;

FIG. 51 is a tabular representation of a SIP bye message transmittedfrom either of the telephones shown in FIG. 1 to the call controller;

FIG. 52 is a tabular representation of a SIP bye message sent to thecontroller from the Calgary callee;

FIG. 53 is a flowchart of a process executed by the call controller forproducing a RC stop message in response to receipt of a SIP bye message;

FIG. 54 is a tabular representation of an exemplary RC call stopmessage;

FIG. 55 is a tabular representation of an RC call stop message for theCalgary callee;

FIGS. 56A and 56B are respective portions of a flowchart of a RC callstop message handling routine executed by the RC shown in FIG. 1;

FIG. 57 is a tabular representation of a reseller accounts table record;

FIG. 58 is a tabular representation of a reseller accounts table recordfor the reseller Klondike;

FIG. 59 is a tabular representation of a system operator accounts tablerecord; and

FIG. 60 is a tabular representation of a system operator accounts recordfor the system operator described herein.

DETAILED DESCRIPTION

Referring to FIG. 1, a system for making voice over IPtelephone/videophone calls is shown generally at 10. The system includesa first super node shown generally at 11 and a second super node showngenerally at 21. The first super node 11 is located in geographicalarea, such as Vancouver, B.C., Canada for example and the second supernode 21 is located in London, England, for example. Different supernodes may be located in different geographical regions throughout theworld to provide telephone/videophone service to subscribers inrespective regions. These super nodes may be in communication with eachother by high speed/ high data throughput links including optical fiber,satellite and/or cable links, forming a backbone to the system. Thesesuper nodes may alternatively or, in addition, be in communication witheach other through conventional internet services.

In the embodiment shown, the Vancouver supernode 11 providestelephone/videophone service to western Canadian customers fromVancouver Island to Ontario. Another node (not shown) may be located inEastern Canada to provide services to subscribers in that area.

Other nodes of the type shown may also be employed within thegeographical area serviced by a supernode, to provide for call loadsharing, for example within a region of the geographical area servicedby the supernode. However, in general, all nodes are similar and havethe properties described below in connection with the Vancouversupernode 11.

In this embodiment, the Vancouver supernode includes a call controller(C) 14, a routing controller (RC) 16, a database 18 and a voicemailserver 19 and a media relay 9. Each of these may be implemented asseparate modules on a common computer system or by separate computers,for example. The voicemail server 19 need not be included in the nodeand can be provided by an outside service provider.

Subscribers such as a subscriber in Vancouver and a subscriber inCalgary communicate with the Vancouver supernode using their owninternet service providers which route internet traffic from thesesubscribers over the internet shown generally at 13 in FIG. 1. To thesesubscribers the Vancouver supernode is accessible at a pre-determinedinternet protocol (IP) address or a fully qualified domain name that canbe accessed in the usual way through a subscriber's internet serviceprovider. The subscriber in Vancouver uses a telephone 12 that iscapable of communicating with the Vancouver supernode 11 using SessionInitiation Protocol (SIP) messages and the Calgary subscriber uses asimilar telephone 15, in Calgary AB.

It should be noted that throughout the description of the embodiments ofthis invention, the IP/UDP addresses of all elements such as the callerand callee telephones, call controller, media relay, and any others,will be assumed to be valid IP/UDP addresses directly accessible via theInternet or a private IP network, for example, depending on the specificimplementation of the system. As such, it will be assumed, for example,that the caller and callee telephones will have IP/UDP addressesdirectly accessible by the call controllers and the media relays ontheir respective supernodes, and those addresses will not be obscured byNetwork Address Translation (NAT) or similar mechanisms. In other words,the IP/UDP information contained in SIP messages (for example the SIPInvite message or the RC Request message which will be described below)will match the IP/UDP addresses of the IP packets carrying these SIPmessages.

It will be appreciated that in many situations, the IP addressesassigned to various elements of the system may be in a private IPaddress space, and thus not directly accessible from other elements.Furthermore, it will also be appreciated that NAT is commonly used toshare a “public” IP address between multiple devices, for examplebetween home PCs and IP telephones sharing a single Internet connection.For example, a home PC may be assigned an IP address such as192.168.0.101 and a Voice over IP telephone may be assigned an IPaddress of 192.168.0.103. These addresses are located in so called“non-routable” (IP) address space and cannot be accessed directly fromthe Internet. In order for these devices to communicate with othercomputers located on the Internet, these IP addresses have to beconverted into a “public” IP address, for example 24.10.10.123 assignedby the Internet Service Provider to the subscriber, by a deviceperforming NAT, typically a home router. In addition to translating theIP addresses, NAT typically also translates UDP port numbers, forexample an audio path originating at a VoIP telephone and using a UDPport 12378 at its private IP address, may have be translated to a UDPport 23465 associated with the public IP address of the NAT device. Inother words, when a packet originating from the above VoIP telephonearrives at an Internet-based supernode, the source IP/UDP addresscontained in the IP packet header will be 24.10.10.1:23465, whereas thesource IP/UDP address information contained in the SIP message insidethis IP packet will be 192.168.0.103:12378. The mismatch in the IP/UDPaddresses may cause a problem for SIP-based VoIP systems because, forexample, a supernode will attempt to send messages to a private addressof a telephone but the messages will never get there.

Referring to FIG. 1, in an attempt to make a call by the Vancouvertelephone/videophone 12 to the Calgary telephone/videophone 15, theVancouver telephone/videophone sends a SIP invite message to theVancouver supernode 11 and in response, the call controller 14 sends anRC request message to the RC 16 which makes various enquiries of thedatabase 18 to produce a routing message which is sent back to the callcontroller 14. The call controller 14 then communicates with the mediarelay 9 to cause a communications link including an audio path and avideophone (if a videopath call) to be established through the mediarelay to the same node, a different node or to a communications suppliergateway as shown generally at 20 to carry audio, and where applicable,video traffic to the call recipient or callee.

Generally, the RC 16 executes a process to facilitate communicationbetween callers and callees. The process involves, in response toinitiation of a call by a calling subscriber, receiving a calleeidentifier from the calling subscriber, using call classificationcriteria associated with the calling subscriber to classify the call asa public network call or a private network call and producing a routingmessage identifying an address on the private network, associated withthe callee when the call is classified as a private network call andproducing a routing message identifying a gateway to the public networkwhen the call is classified as a public network call.

Subscriber Telephone

In greater detail, referring to FIG. 2, in this embodiment, thetelephone/videophone 12 includes a processor circuit shown generally at30 comprising a microprocessor 32, program memory 34, an input/output(I/O) port 36, parameter memory 38 and temporary memory 40. The programmemory 34, I/O port 36, parameter memory 38 and temporary memory 40 areall in communication with the microprocessor 32. The I/O port 36 has adial input 42 for receiving a dialled telephone/videophone number from akeypad, for example, or from a voice recognition unit or from pre-storedtelephone/videophone numbers stored in the parameter memory 38, forexample. For simplicity, in FIG. 2 a box labelled dialing functions 44represents any device capable of informing the microprocessor 32 of acallee identifier, e.g., a callee telephone/videophone number.

The processor 32 stores the callee identifier in a dialled number buffer45. In this case, assume the dialled number is 2001 1050 2222 and thatit is a number associated with the Calgary subscriber. The I/O port 36also has a handset interface 46 for receiving and producing signals fromand to a handset that the user may place to his ear. This interface 46may include a BLUETOOTH™ wireless interface, a wired interface orspeaker phone, for example. The handset acts as a termination point foran audio path (not shown) which will be appreciated later. The I/O port36 also has an internet connection 48 which is preferably a high speedinternet connection and is operable to connect the telephone/videophoneto an internet service provider. The internet connection 48 also acts asa part of the voice path, as will be appreciated later. It will beappreciated that where the subscriber device is a videophone, a separatevideo path is established in the same way an audio path is established.For simplicity, the following description refers to a telephone call,but it is to be understood that a videophone call is handled similarly,with the call controller causing the media relay to facilitate both anaudio path and a video path instead of only an audio path.

The parameter memory 38 has a username field 50, a password field 52 anIP address field 53 and a SIP proxy address field 54, for example. Theuser name field 50 is operable to hold a user name, which in this caseis 2001 1050 8667. The user name is assigned upon subscription orregistration into the system and, in this embodiment, includes a twelvedigit number having a continent code 61 , a country code 63, a dealercode 70 and a unique number code 74. The continent code 61 is comprisedof the first or left-most digit of the user name in this embodiment. Thecountry code 63 is comprised of the next three digits. The dealer code70 is comprised of the next four digits and the unique number code 74 iscomprised of the last four digits. The password field 52 holds apassword of up to 512 characters, in this example. The IP address field53 stores an IP address of the telephone, which for this explanation is192.168.0.20. The SIP proxy address field 54 holds an IP protocolcompatible proxy address which may be provided to the telephone throughthe internet connection 48 as part of a registration procedure.

The program memory 34 stores blocks of codes for directing the processor32 to carry out the functions of the telephone, one of which includes afirewall block 56 which provides firewall functions to the telephone, toprevent access by unauthorized persons to the microprocessor 32 andmemories 34, 38 and 40 through the internet connection 48. The programmemory 34 also stores codes 57 for establishing a call ID. The call IDcodes 57 direct the processor 32 to produce a call identifier having aformat comprising a hexadecimal string at an IP address, the IP addressbeing the IP address of the telephone. Thus, an exemplary callidentifier might be FF10@192.168.0.20.

Generally, in response to picking up the handset interface 46 andactivating a dialing function 44, the microprocessor 32 produces andsends a SIP invite message as shown in FIG. 3, to the routing controller16 shown in FIG. 1. This SIP invite message is essentially to initiate acall by a calling subscriber.

Referring to FIG. 3, the SIP invite message includes a caller ID field60, a callee identifier field 62, a digest parameters field 64, a callID field 65 an IP address field 67 and a caller UDP port field 69. Inthis embodiment, the caller ID field 60 includes the user name 200110508667 that is the Vancouver user name stored in the user name field50 of the parameter memory 38 in the telephone 12 shown in FIG. 2. Inaddition, referring back to FIG. 3, the callee identifier field 62includes a callee identifier which in this embodiment is the user name2001 1050 2222 that is the dialled number of the Calgary subscriberstored in the dialled number buffer 45 shown in FIG. 2. The digestparameters field 64 includes digest parameters and the call ID field 65includes a code comprising a generated prefix code (FF10) and a suffixwhich is the Internet Protocol (IP) address of the telephone 12 storedin the IP address field 53 of the telephone. The IP address field 67holds the IP address assigned to the telephone, in this embodiment192.168.0.20, and the caller UDP port field 69 includes a UDP portidentifier identifying a UDP port at which the audio path will beterminated at the caller's telephone.

Call Controller

Referring to FIG. 4, a call controller circuit of the call controller 14(FIG. 1) is shown in greater detail at 100. The call controller circuit100 includes a microprocessor 102, program memory 104 and an I/O port106. The circuit 100 may include a plurality of microprocessors, aplurality of program memories and a plurality of I/O ports to be able tohandle a large volume of calls. However, for simplicity, the callcontroller circuit 100 will be described as having only onemicroprocessor 102, program memory 104 and I/O port 106, it beingunderstood that there may be more.

Generally, the I/O port 106 includes an input 108 for receiving messagessuch as the SIP invite message shown in FIG. 3, from the telephone shownin FIG. 2. The I/O port 106 also has an RC request message output 110for transmitting an RC request message to the RC 16 of FIG. 1 , an RCmessage input 112 for receiving routing messages from the RC 16, agateway output 114 for transmitting messages to one of the gateways 20shown in FIG. 1 to advise the gateway to establish an audio path, forexample, and a gateway input 116 for receiving messages from thegateway. The I/O port 106 further includes a SIP output 118 fortransmitting messages to the telephone 12 to advise the telephone of theIP addresses of the gateways which will establish the audio path. TheI/O port 106 further includes a voicemail server input and output 117,119 respectively for communicating with the voicemail server 19 shown inFIG. 1.

While certain inputs and outputs have been shown as separate, it will beappreciated that some may be a single IP address and IP port. Forexample, the messages sent to the RC 16 and received from the RC 16 maybe transmitted and received on the same single IP port.

The program memory 104 includes blocks of code for directing themicroprocessor 102 to carry out various functions of the call controller14. For example, these blocks of code include a first block 120 forcausing the call controller circuit 100 to execute a SIP invite to RCrequest process to produce an RC request message in response to areceived SIP invite message. In addition, there is a routing message togateway message block 122 which causes the call controller circuit 100to produce a gateway query message in response to a received routingmessage from the RC 16.

Referring to FIG. 5, the SIP invite to RC request process is shown inmore detail at 120. On receipt of a SIP invite message of the type shownin FIG. 3, block 122 of FIG. 5 directs the call controller circuit 100of FIG. 4 to authenticate the user. This may be done, for example, byprompting the user for a password, by sending a message back to thetelephone 12 which is interpreted at the telephone as a request for apassword entry or the password may automatically be sent to the callcontroller 14 from the telephone, in response to the message. The callcontroller 14 may then make enquiries of databases to which it hasaccess, to determine whether or not the user's password matches apassword stored in the database. Various functions may be used to passencryption keys or hash codes back and forth to ensure that thetransmittal of passwords is secure.

Should the authentication process fail, the call controller circuit 100is directed to an error handling routine 124 which causes messages to bedisplayed at the telephone 12 to indicate there was an authenticationproblem. If the authentication procedure is passed, block 121 directsthe call controller circuit 100 to determine whether or not the contentsof the caller ID field 60 of the SIP invite message received from thetelephone is an IP address. If it is an IP address, then block 123directs the call controller circuit 100 to set the contents of a typefield variable maintained by the microprocessor 102 to a coderepresenting that the call type is a third party invite. If at block 121the caller ID field contents do not identify an IP address, then block125 directs the microprocessor to set the contents of the type field toa code indicating that the call is being made by a system subscriber.Then, block 126 directs the call controller circuit to read the callidentifier 65 provided in the SIP invite message from the telephone 12,and at block 128 the processor is directed to produce an RC requestmessage that includes that call ID. Block 129 then directs the callcontroller circuit 100 to send the RC request to the RC 16.

Referring to FIG. 6, an RC request message is shown generally at 150 andincludes a caller field 152, a callee field 154, a digest field 156, acall ID field 158 and a type field 160. The caller, callee, digest callID fields 152, 154, 156 and 158 contain copies of the caller, callee,digest parameters and call ID fields 60, 62, 64 and 65 of the SIP invitemessage shown in FIG. 3. The type field 160 contains the type codeestablished at blocks 123 or 125 of FIG. 5 to indicate whether the callis from a third party or system subscriber, respectively. The calleridentifier field may include a PSTN number or a system subscriberusername as shown, for example.

Routing Controller (RC)

Referring to FIG. 7, the RC 16 is shown in greater detail and includesan RC processor circuit shown generally at 200. The RC processor circuit200 includes a processor 202, program memory 204, a table memory 206,buffer memory 207, and an I/O port 208, all in communication with theprocessor 202. (As earlier indicated, there may be a plurality ofprocessor circuits (202), memories (204), etc.)

The buffer memory 207 includes a caller id buffer 209 and a callee idbuffer 211.

The I/O port 208 includes a database request port 210 through which arequest to the database (18 shown in FIG. 1) can be made and includes adatabase response port 212 for receiving a reply from the database 18.The I/O port 208 further includes an RC request message input 214 forreceiving the RC request message from the call controller (14 shown inFIG. 1) and includes a routing message output 216 for sending a routingmessage back to the call controller 14. The I/O port 208 thus acts toreceive caller identifier and a callee identifier contained in the RCrequest message from the call controller, the RC request message beingreceived in response to initiation of a call by a calling subscriber.

The program memory 204 includes blocks of codes for directing theprocessor 202 to carry out various functions of the RC (16). One ofthese blocks includes an RC request message handler 250 which directsthe RC to produce a routing message in response to a received RC requestmessage. The RC request message handler process is shown in greaterdetail at 250 in FIGS. 8A through 8D.

RC Request Message Handler

Referring to FIG. 8A, the RC request message handler begins with a firstblock 252 that directs the RC processor circuit (200) to store thecontents of the RC request message (150) in buffers in the buffer memory207 of FIG. 7, one of which includes the caller ID buffer 209 of FIG. 7for separately storing the contents of the callee field 154 of the RCrequest message. Block 254 then directs the RC processor circuit to usethe contents of the caller field 152 in the RC request message shown inFIG. 6, to locate and retrieve from the database 18 a record associatingcalling attributes with the calling subscriber. The located record maybe referred to as a dialing profile for the caller. The retrieveddialing profile may then be stored in the buffer memory 207, forexample.

Referring to FIG. 9, an exemplary data structure for a dialing profileis shown generally at 253 and includes a user name field 258, a domainfield 260, and calling attributes comprising a national dialing digits(NDD) field 262, an international dialing digits (IDD) field 264, acountry code field 266, a local area codes field 267, a caller minimumlocal length field 268, a caller maximum local length field 270, areseller field 273, a maximum number of concurrent calls field 275 and acurrent number of concurrent calls field 277. Effectively the dialingprofile is a record identifying calling attributes of the calleridentified by the caller identifier. More generally, dialing profilesrepresent calling attributes of respective subscribers.

An exemplary caller profile for the Vancouver subscriber is showngenerally at 276 in FIG. 10 and indicates that the user name field 258includes the user name (2001 1050 8667) that has been assigned to thesubscriber and is stored in the user name field 50 in the telephone asshown in FIG. 2.

Referring back to FIG. 10, the domain field 260 includes a domain nameas shown at 282, including a node type identifier 284, a location codeidentifier 286, a system provider identifier 288 and a domain portion290. The domain field 260 effectively identifies a domain or nodeassociated with the user identified by the contents of the user namefield 258.

In this embodiment, the node type identifier 284 includes the code “sp”identifying a supernode and the location identifier 286 identifies thesupernode as being in Vancouver (YVR). The system provider identifier288 identifies the company supplying the service and the domain portion290 identifies the “com” domain.

The national dialled digit field 262 in this embodiment includes thedigit “1” and, in general, includes a number specified by theInternational Telecommunications Union (ITU) TelecommunicationsStandardization Sector (ITU-T) E. 164 Recommendation which assignsnational dialing digits to countries.

The international dialing digit field 264 includes a code also assignedaccording to the ITU-T according to the country or location of the user.

The country code field 266 also includes the digit “1” and, in general,includes a number assigned according to the ITU-T to represent thecountry in which the user is located.

The local area codes field 267 includes a list of area codes that havebeen assigned by the ITU-T to the geographical area in which thesubscriber is located. The caller minimum and maximum local numberlength fields 268 and 270 hold numbers representing minimum and maximumlocal number lengths permitted in the area code(s) specified by thecontents of the local area codes field 267. The reseller field 273 isoptional and holds a code identifying a retailer of the services, inthis embodiment “Klondike”. The maximum number of concurrent calls field275 holds a code identifying the maximum number of concurrent calls thatthe user is entitled to cause to concurrently exist. This permits morethan one call to occur concurrently while all calls for the user arebilled to the same account. The current number of concurrent calls field277 is initially 0 and is incremented each time a concurrent callassociated with the user is initiated and is decremented when aconcurrent call is terminated.

The area codes associated with the user are the area codes associatedwith the location code identifier 286 of the contents of the domainfield 260.

A dialing profile of the type shown in FIG. 9 is produced whenever auser registers with the system or agrees to become a subscriber to thesystem. Thus, for example, a user wishing to subscribe to the system maycontact an office maintained by a system operator and personnel in theoffice may ask the user certain questions about his location and servicepreferences, whereupon tables can be used to provide office personnelwith appropriate information to be entered into the user name 258,domain 260, NDD 262, IDD 264, country code 266, local area codes 267,caller minimum and maximum local length fields 268 and 270 resellerfield 273 and concurrent call fields 275 and 277 to establish a dialingprofile for the user.

Referring to FIGS. 11 and 12, callee dialing profiles for users inCalgary and London, respectively for example, are shown.

In addition to creating dialing profiles when a user registers with thesystem, a direct-in-dial (DID) record of the type shown at 278 in FIG.13 is added to a direct-in-dial bank table in the database (18 inFIG. 1) to associate the username and a host name of the supernode withwhich the user is associated, with an E.164 number associated with theuser on the PSTN network.

An exemplary DID table record entry for the Calgary callee is showngenerally at 300 in FIG. 14. The user name field 281 and user domainfield 272 are analogous to the user name and user domain fields 258 and260 of the caller dialing profile shown in FIG. 10. The contents of theDID field 274 include a E.164 public telephone number including acountry code 283, an area code 285, an exchange code 287 and a number289. If the user has multiple telephone numbers, then multiple recordsof the type shown at 300 would be included in the DID bank table, eachhaving the same user name and user domain, but different DID field 274contents reflecting the different telephone numbers associated with thatuser.

In addition to creating dialing profiles as shown in FIG. 9 and DIDrecords as shown in FIG. 13 when a user registers with the system, callblocking records of the type shown in FIG. 26, call forwarding recordsof the type shown in FIG. 28 and voicemail records of the type shown inFIG. 30 may be added to the database 18 when a new subscriber is addedto the system.

Referring back to FIG. 8A, after retrieving a dialing profile for thecaller, such as shown at 276 in FIG. 10, the RC processor circuit 200 isdirected to block 256 which directs the processor circuit (200) todetermine whether the contents of the concurrent call field 277 are lessthen the contents of the maximum concurrent call field 275 of thedialing profile for the caller and, if so, block 271 directs theprocessor circuit to increment the contents of the concurrent call field277. If the contents of concurrent call field 277 are equal to orgreater than the contents of the maximum concurrent call field 275,block 259 directs the processor circuit 200 to send an error messageback to the call controller (14) to cause the call controller to notifythe caller that the maximum number of concurrent calls has been reachedand no further calls can exist concurrently, including the presentlyrequested call.

Assuming block 256 allows the call to proceed, the RC processor circuit200 is directed to perform certain checks on the callee identifierprovided by the contents of the callee field 154 in FIG. 6, of the RCrequest message 150. These checks are shown in greater detail in FIG.8B.

Referring to FIG. 8B, the processor (202 in FIG. 7) is directed to afirst block 257 that causes it to determine whether a digit pattern ofthe callee identifier (154) provided in the RC request message (150)includes a pattern that matches the contents of the internationaldialing digits (IDD) field 264 in the caller profile shown in FIG. 10.If so, then block 259 directs the processor (202) to set a call typecode identifier variable maintained by the processor to indicate thatthe call is an international call and block 261 directs the processor toproduce a reformatted callee identifier by reformatting the calleeidentifier into a predefined digit format. In this embodiment, this isdone by removing the pattern of digits matching the IDD field contents264 of the caller dialing profile to effectively shorten the calleeidentifier. Then, block 263 directs the processor 202 to determinewhether or not the callee identifier has a length which meets criteriaestablishing it as a number compliant with the E.164 Standard set by theITU. If the length does not meet this criteria, block 265 directs theprocessor 202 to send back to the call controller (14) a messageindicating the length is not correct. The process is then ended. At thecall controller 14, routines (not shown) stored in the program memory104 may direct the processor (102 of FIG. 4) to respond to the incorrectlength message by transmitting a message back to the telephone (12 shownin FIG. 1) to indicate that an invalid number has been dialled.

Still referring to FIG. 8B, if the length of the amended calleeidentifier meets the criteria set forth at block 263, block 269 directsthe processor (202 of FIG. 7) to make a database request to determinewhether or not the amended callee identifier is found in a record in thedirect-in-dial bank (DID) table. Referring back to FIG. 8B, at block269, if the processor 202 receives a response from the databaseindicating that the reformatted callee identifier produced at block 261is found in a record in the DID bank table, then the callee is asubscriber to the system and the call is classified as a private networkcall by directing the processor to block 279 which directs the processorto copy the contents of the corresponding user name field (281 in FIG.14) from the callee DID bank table record (300 in FIG. 14) into thecallee ID buffer (211 in FIG. 7). Thus, the processor 202 locates asubscriber user name associated with the reformatted callee identifier.The processor 202 is then directed to point B in FIG. 8A.

Subscriber to Subscriber Calls Between Different Nodes

Referring to FIG. 8A, block 280 directs the processor (202 of FIG. 7) toexecute a process to determine whether or not the node associated withthe reformatted callee identifier is the same node that is associatedwith the caller identifier. To do this, the processor 202 determineswhether or not a prefix (e.g., continent code 61) of the callee nameheld in the callee ID buffer (211 in FIG. 7), is the same as thecorresponding prefix of the caller name held in the username field 258of the caller dialing profile shown in FIG. 10. If the correspondingprefixes are not the same, block 302 in FIG. 8A directs the processor(202 in FIG. 7) to set a call type flag in the buffer memory (207 inFIG. 7) to indicate the call is a cross-domain call. Then, block 350 ofFIG. 8A directs the processor (202 of FIG. 7) to produce a routingmessage identifying an address on the private network with which thecallee identified by the contents of the callee ID buffer is associatedand to set a time to live for the call at a maximum value of 99999, forexample.

Thus the routing message includes a caller identifier, a call identifierset according to a username associated with the located DID bank tablerecord and includes an identifier of a node on the private network withwhich the callee is associated.

The node in the system with which the callee is associated is determinedby using the callee identifier to address a supernode table havingrecords of the type as shown at 370 in FIG. 17. Each record 370 has aprefix field 372 and a supernode address field 374. The prefix field 372includes the first n digits of the callee identifier. In this embodimentn=2. The supernode address field 374 holds a code representing the IPaddress or a fully qualified domain name of the node associated with thecode stored in the callee identifier prefix field 372. Referring to FIG.18, for example, if the prefix is 20, the supernode address associatedwith that prefix is sp.yvr.digifonica.com.

Referring to FIG. 15, a generic routing message is shown generally at352 and includes an optional supplier prefix field 354, and optionaldelimiter field 356, a callee user name field 358, at least one routefield 360, a time to live field 362 and other fields 364. The optionalsupplier prefix field 354 holds a code for identifying supplier traffic.The optional delimiter field 356 holds a symbol that delimits thesupplier prefix code from the callee user name field 358. In thisembodiment, the symbol is a number sign (#). The route field 360 holds adomain name or IP address of a gateway or node that is to carry thecall, and the time to live field 362 holds a value representing thenumber of seconds the call is permitted to be active, based onsubscriber available minutes and other billing parameters.

Referring to FIG. 8A and FIG. 16, an example of a routing messageproduced by the processor at block 350 for a caller associated with adifferent node than the caller is shown generally at 366 and includesonly a callee field 359, a route field 361 and a time to live field 362.

Referring to FIG. 8A, having produced a routing message as shown in FIG.16, block 381 directs the processor (202 of FIG. 7) to send the routingmessage shown in FIG. 16 to the call controller 14 shown in FIG. 1.

Referring back to FIG. 8B, if at block 257, the callee identifier storedin the callee id buffer (211 in FIG. 7) does not begin with aninternational dialing digit, block 380 directs the processor (202) todetermine whether or not the callee identifier begins with the samenational dial digit code as assigned to the caller. To do this, theprocessor (202) is directed to refer to the retrieved caller dialingprofile as shown in FIG. 10. In FIG. 10, the national dialing digit code262 is the number 1. Thus, if the callee identifier begins with thenumber 1, then the processor (202) is directed to block 382 in FIG. 8B.

Block 382 directs the processor (202 of FIG. 7) to examine the calleeidentifier to determine whether or not the digits following the NDDdigit identify an area code that is the same as any of the area codesidentified in the local area codes field 267 of the caller dialingprofile 276 shown in FIG. 10. If not, block 384 of FIG. 8B directs theprocessor 202 to set the call type flag to indicate that the call is anational call. If the digits following the NDD digit identify an areacode that is the same as a local area code associated with the caller asindicated by the caller dialing profile, block 386 directs the processor202 to set the call type flag to indicate a local call, national style.After executing blocks 384 or 386, block 388 directs the processor 202to format the callee identifier into a pre-defined digit format toproduce a re-formatted callee identifier by removing the nationaldialled digit and prepending a caller country code identified by thecountry code field 266 of the caller dialing profile shown in FIG. 10.The processor (202) is then directed to block 263 of FIG. 8B to performother processing as already described above.

If at block 380, the callee identifier does not begin with a nationaldialled digit, block 390 directs the processor (202) to determinewhether the callee identifier begins with digits that identify the samearea code as the caller. Again, the reference for this is the retrievedcaller dialing profile shown in FIG. 10. The processor (202) determineswhether or not the first few digits of the callee identifier identify anarea code corresponding to the local area code field 267 of theretrieved caller dialing profile. If so, then block 392 directs theprocessor 202 to set the call type flag to indicate that the call is alocal call and block 394 directs the processor (202) to format thecallee identifier into a pre-defined digit format to produce areformatted callee identifier by prepending the caller country code tothe callee identifier, the caller country code being determined from thecountry code field 266 of the retrieved caller dialing profile shown inFIG. 10. The processor (202) is then directed to block 263 for furtherprocessing as described above.

Referring back to FIG. 8B, at block 390, the callee identifier does notstart with the same area code as the caller, block 396 directs theprocessor (202 of FIG. 7) to determine whether the number of digits inthe callee identifier, i.e. the length of the callee identifier, iswithin the range of digits indicated by the caller minimum local numberlength field 268 and the caller maximum local number length field 270 ofthe retrieved caller dialing profile shown in FIG. 10. If so, then block398 directs the processor (202) to set the call type flag to indicate alocal call and block 400 directs the processor (202) to format thecallee identifier into a pre-defined digit format to produce areformatted callee identifier by prepending to the callee identifier thecaller country code (as indicated by the country code field 266 of theretrieved caller dialing profile shown in FIG. 10) followed by thecaller area code (as indicated by the local area code field 267 of thecaller profile shown in FIG. 10). The processor (202) is then directedto block 263 of FIG. 8B for further processing as described above.

Referring back to FIG. 8B, if at block 396, the callee identifier has alength that does not fall within the range specified by the callerminimum local number length field (268 in FIG. 10) and the callermaximum local number length field (270 in FIG. 10), block 402 directsthe processor 202 of FIG. 7 to determine whether or not the calleeidentifier identifies a valid user name. To do this, the processor 202searches through the database (18 of FIG. 10 of dialing profiles to finda dialing profile having user name field contents (258 in FIG. 10) thatmatch the callee identifier. If no match is found, block 404 directs theprocessor (202) to send an error message back to the call controller(14). If at block 402, a dialing profile having a user name field 258that matches the callee identifier is found, block 406 directs theprocessor 202 to set the call type flag to indicate that the call is aprivate network call and then the processor is directed to block 280 ofFIG. 8A. Thus, the call is classified as a private network call when thecallee identifier identifies a subscriber to the private network.

From FIG. 8B, it will be appreciated that there are certain groups ofblocks of codes that direct the processor 202 in FIG. 7 to determinewhether the callee identifier has certain features such as aninternational dialing digit, a national dialing digit, an area code anda length that meet certain criteria, and cause the processor 202 toreformat the callee identifier stored in the callee id buffer 211 , asnecessary into a predetermined target format including only a countrycode, area code, and a normal telephone number, for example, to causethe callee identifier to be compatible with the E.164 number planstandard in this embodiment. This enables block 269 in FIG. 8B to have aconsistent format of callee identifiers for use in searching through theDID bank table records of the type shown in FIG. 13 to determine how toroute calls for subscriber to subscriber calls on the same system.Effectively, therefore blocks 257, 380, 390, 396 and 402 establish callclassification criteria for classifying the call as a public networkcall or a private network call. Block 269 classifies the call, dependingon whether or not the formatted callee identifier has a DID bank tablerecord and this depends on how the call classification criteria are metand block 402 directs the processor 202 of FIG. 7 to classify the callas a private network call when the callee identifier complies with apre-defined format, i.e. is a valid user name and identifies asubscriber to the private network, after the callee identifier has beensubjected to the classification criteria of blocks 257, 380, 390 and396.

Subscriber to Non-Subscriber Calls

Not all calls will be subscriber to subscriber calls and this will bedetected by the processor 202 of FIG. 7 when it executes block 269 inFIG. 8B, and does not find a DID bank table record that is associatedwith the callee, in the DID bank table. When this occurs, the call isclassified as a public network call by directing the processor 202 toblock 408 of FIG. 8B which causes it to set the contents of the calleeid buffer 211 of FIG. 7 equal to the newly formatted callee identifier,i.e., a number compatible with the E.164 standard. Then, block 410 ofFIG. 8B directs the processor (202) to search a database of route ormaster list records associating route identifiers with dialing codesshown in FIG. 19 to locate a router having a dialing code having anumber pattern matching at least a portion of the reformatted calleeidentifier.

Referring to FIG. 19, a data structure for a master list or route listrecord is shown. Each master list record includes a master list ID field500, a dialing code field 502, a country code field 504, a national signnumber field 506, a minimum length field 508, a maximum length field510, a national dialled digit field 512, an international dialled digitfield 514 and a buffer rate field 516.

The master list ID field 500 holds a unique code such as 1019, forexample, identifying the record. The dialing code field 502 holds apredetermined number pattern that the processor 202 of FIG. 7 uses atblock 410 in FIG. 8B to find the master list record having a dialingcode matching the first few digits of the amended callee identifierstored in the callee id buffer 211. The country code field 504 holds anumber representing the country code associated with the record and thenational sign number field 506 holds a number representing the area codeassociated with the record. (It will be observed that the dialing codeis a combination of the contents of the country code field 504 and thenational sign number field 506.) The minimum length field 508 holds anumber representing the minimum length of digits associated with therecord and the maximum length field 51 holds a number representing themaximum number of digits in a number with which the record may becompared. The national dialled digit (NDD) field 512 holds a numberrepresenting an access code used to make a call within the countryspecified by the country code, and the international dialled digit (IDD)field 514 holds a number representing the international prefix needed todial a call from the country indicated by the country code.

Thus, for example, a master list record may have a format as shown inFIG. 20 with exemplary field contents as shown.

Referring back to FIG. 8B, using the country code and area code portionsof the reformatted callee identifier stored in the callee id buffer 211, block 410 directs the processor 202 of FIG. 7 to find a master listrecord such as the one shown in FIG. 20 having a dialing code thatmatches the country code (1) and area code (604) of the calleeidentifier. Thus, in this example, the processor (202) would find amaster list record having an ID field containing the number 1019. Thisnumber may be referred to as a route ID. Thus, a route ID number isfound in the master list record associated with a predetermined numberpattern in the reformatted callee identifier.

After executing block 410 in FIG. 8B, the process continues as shown inFIG. 8D. Referring to FIG. 8D, block 412 directs the processor 202 ofFIG. 7 to use the route ID number to search a database of supplierrecords associating supplier identifiers with route identifiers tolocate at least one supplier record associated with the route identifierto identify at least one supplier operable to supply a communicationslink for the route.

Referring to FIG. 21, a data structure for a supplier list record isshown. Supplier list records include a supplier ID field 540, a masterlist ID field 542, an optional prefix field 544, a specific routeidentifier field 546, a NDD/IDD rewrite field 548, a rate field 550, anda timeout field 551. The supplier ID field 540 holds a code identifyingthe name of the supplier and the master list ID field 542 holds a codefor associating the supplier record with a master list record. Theprefix field 544 holds a string used to identify the supplier trafficand the specific route identifier field 546 holds an IP address of agateway operated by the supplier indicated by the supplier ID field 540.The NDD/IDD rewrite field 548 holds a code representing a rewrittenvalue of the NDD/IDD associated with this route for this supplier, andthe rate field 550 holds a code indicating the cost per second to thesystem operator to use the route provided by the gateway specified bythe contents of the route identifier field 546. The timeout field 551holds a code indicating a time that the call controller should wait fora response from the associated gateway before giving up and trying thenext gateway. This time value may be in seconds, for example. Exemplarysupplier records are shown in FIGS. 22, 23 and 24 for the exemplarysuppliers shown at 20 in FIG. 1, namely Telus, Shaw and Sprint.

Referring back to FIG. 8D, at block 412 the processor 202 finds allsupplier records that identify the master list ID found at block 410 ofFIG. 8B.

Referring back to FIG. 8D, block 560 directs the processor 202 of FIG. 7to begin to produce a routing message of the type shown in FIG. 15. Todo this, the processor 202 loads a routing message buffer as shown inFIG. 25 with a supplier prefix of the least costly supplier where theleast costly supplier is determined from the rate fields 550 of FIG. 21of the records associated with respective suppliers.

Referring to FIGS. 22-24, in the embodiment shown, the supplier “Telus”has the lowest number in the rate field 550 and therefore the prefix4973 associated with that supplier is loaded into the routing messagebuffer shown in FIG. 25 first.

Block 562 in FIG. 8D directs the processor to delimit the prefix 4973 bythe number sign (#) and to next load the reformatted callee identifierinto the routing message buffer shown in FIG. 25. At block 563 of FIG.8D, the contents of the route identifier field 546 of FIG. 21 of therecord associated with the supplier “Telus” are added by the processor202 of FIG. 7 to the routing message buffer shown in FIG. 25 after an @sign delimiter, and then block 564 in FIG. 8D directs the processor toget a time to live value, which in one embodiment may be 3600 seconds,for example. Block 566 then directs the processor 202 to load this timeto live value and the timeout value (551) in FIG. 21 in the routingmessage buffer of FIG. 25. Accordingly, a first part of the routingmessage for the Telus gateway is shown generally at 570 in FIG. 25.

Referring back to FIG. 8D, block 571 directs the processor 202 back toblock 560 and causes it to repeat blocks 560, 562, 563, 564 and 566 foreach successive supplier until the routing message buffer is loaded withinformation pertaining to each supplier identified by the processor atblock 412. Thus, a second portion of the routing message as shown at 572in FIG. 25 relates to the second supplier identified by the record shownin FIG. 23. Referring back to FIG. 25, a third portion of the routingmessage as shown at 574 and is associated with a third supplier asindicated by the supplier record shown in FIG. 24.

Consequently, referring to FIG. 25, the routing message buffer holds arouting message identifying a plurality of different suppliers able toprovide gateways to the public telephone network (i.e. specific routes)to establish at least part of a communication link through which thecaller may contact the callee. In this embodiment, each of the suppliersis identified, in succession, according to rate. Other criteria fordetermining the order in which suppliers are listed in the routingmessage may include preferred supplier priorities which may beestablished based on service agreements, for example.

Referring back to FIG. 8D, block 568 directs the processor 202 of FIG. 7to send the routing message shown in FIG. 25 to the call controller 14in FIG. 1.

Subscriber to Subscriber Calls Within the Same Node

Referring back to FIG. 8A, if at block 280, the callee identifierreceived in the RC request message has a prefix that identifies the samenode as that associated with the caller, block 600 directs the processor202 to use the callee identifier in the callee id buffer 211 to locateand retrieve a dialing profile for the callee. The dialing profile maybe of the type shown in FIG. 11 or 12, for example. Block 602 of FIG. 8Athen directs the processor 202 of FIG. 7 to get call block, call forwardand voicemail records from the database 18 of FIG. 1 based on the username identified in the callee dialing profile retrieved by the processorat block 600. Call block, call forward and voicemail records may be asshown in FIGS. 26, 27, 28 and 30 for example.

Referring to FIG. 26, the call block records include a user name field604 and a block pattern field 606. The user name field holds a user namecorresponding to the user name in the user name field (258 in FIG. 10)of the callee profile and the block pattern field 606 holds one or moreE.164-compatible numbers or user names identifying PSTN numbers orsystem subscribers from whom the subscriber identified in the user namefield 604 does not wish to receive calls.

Referring to FIG. 8A and FIG. 27, block 608 directs the processor 202 ofFIG. 7 to determine whether or not the caller identifier received in theRC request message matches a block pattern stored in the block patternfield 606 of the call block record associated with the callee identifiedby the contents of the user name field 604 in FIG. 26. If the calleridentifier matches a block pattern, block 610 directs the processor tosend a drop call or non-completion message to the call controller (14)and the process is ended. If the caller identifier does not match ablock pattern associated with the callee, block 609 directs theprocessor to store the username and domain of the callee, as determinedfrom the callee dialing profile, and a time to live value in the routingmessage buffer as shown at 650 in FIG. 32. Referring back to FIG. 8A,block 612 then directs the processor 202 to determine whether or notcall forwarding is required.

Referring to FIG. 28, the call forwarding records include a user namefield 614, a destination number field 616, and a sequence number field618. The user name field 614 stores a code representing a user withwhich the record is associated. The destination number field 616 holds auser name representing a number to which the current call should beforwarded, and the sequence number field 618 holds an integer numberindicating the order in which the user name associated with thecorresponding destination number field 616 should be attempted for callforwarding. The call forwarding table may have a plurality of recordsfor a given user. The processor 202 of FIG. 7 uses the contents of thesequence number field 618 to place the records for a given user inorder. As will be appreciated below, this enables the call forwardingnumbers to be tried in an ordered sequence.

Referring to FIG. 8A and FIG. 29, if at block 612, the call forwardingrecord for the callee identified by the callee identifier contains nocontents in the destination number field 616 and accordingly no contentsin the sequence number field 618, there are no call forwarding entriesfor this callee, and the processor 202 is directed to block 620 in FIG.8C. If there are entries in the call forwarding table 27, block 622 inFIG. 8A directs the processor 202 to search the dialing profile table tofind a dialing profile record as shown in FIG. 9, for the useridentified by the destination number field 616 of the call forwardrecord shown in FIG. 28. The processor 202 of FIG. 7 is further directedto store the username and domain for that user and a time to live valuein the routing message buffer as shown at 652 in FIG. 32, to produce arouting message as illustrated. This process is repeated for each callforwarding record associated with the callee identified by the callee idbuffer 211 in FIG. 7 to add to the routing message buffer all callforwarding usernames and domains associated with the callee.

Referring back to FIG. 8A, if at block 612 there are no call forwardingrecords, then at block 620 in FIG. 8C the processor 202 is directed todetermine whether or not the user identified by the callee identifierhas paid for voicemail service. This is done by checking to see whetheror not a flag is set in a voicemail record of the type shown in FIG. 30in a voicemail table stored in the database 18 shown in FIG. 1.

Referring to FIG. 30, voicemail records in this embodiment may include auser name field 624, a voicemail server field 626, a seconds tovoicemail field 628 and an enable field 630. The user name field 624stores the user name of the callee. The voicemail server field 626 holdsa code identifying a domain name of a voicemail server associated withthe user identified by the user name field 624. The seconds to voicemailfield 628 holds a code identifying the time to wait before engagingvoicemail, and the enable field 630 holds a code representing whether ornot voicemail is enabled for the user. Referring back to FIG. 8C, atblock 620 if the processor 202 of FIG. 7 finds a voicemail record asshown in FIG. 30 having user name field 624 contents matching the calleeidentifier, the processor is directed to examine the contents of theenabled field 630 to determine whether or not voicemail is enabled. Ifvoicemail is enabled, then block 640 in FIG. 8C directs the processor202 to FIG. 7 to store the contents of the voicemail server field 626and the contents of the seconds to voicemail field 628 in the routingmessage buffer, as shown at 654 in FIG. 32. Block 642 then directs theprocessor 202 to get time to live values for each path specified by therouting message according to the cost of routing and the user's balance.These time to live values are then appended to corresponding pathsalready stored in the routing message buffer.

Referring back to FIG. 8C, block 644 then directs the processor 202 ofFIG. 7 to store the IP address of the current node in the routingmessage buffer as shown at 656 in FIG. 32. Block 646 then directs theprocessor 202 to send the routing message shown in FIG. 32 to the callcontroller 14 in FIG. 1. Thus in the embodiment described the routingcontroller will produce a routing message that will cause at least oneof the following: forward the call to another party, block the call anddirect the caller to a voicemail server.

Referring back to FIG. 1, the routing message whether of the type shownin FIGS. 16, 25 or 32, is received at the call controller 14 and thecall controller interprets the receipt of the routing message as arequest to establish a call.

Referring to FIG. 4, the program memory 104 of the call controller 14includes a routing to gateway routine depicted generally at 122.

Where a routing message of the type shown in FIG. 32 is received by thecall controller 14, the routing to gateway routine 122 shown in FIG. 4may direct the processor 102 cause a message to be sent back through theinternet 13 shown in FIG. 1 to the callee telephone 15, knowing the IPaddress of the callee telephone 15 from the user name.

Alternatively, if the routing message is of the type shown in FIG. 16,which identifies a domain associated with another node in the system,the call controller may send a SIP invite message along the high speedbackbone 17 connected to the other node. The other node functions asexplained above, in response to receipt of a SIP invite message.

If the routing message is of the type shown in FIG. 25 where there are aplurality of gateway suppliers available, the call controller sends aSIP invite message to the first supplier, in this case Telus, using adedicated line or an internet connection to determine whether or notTelus is able to handle the call. If the Telus gateway returns a messageindicating it is not able to handle the call, the call controller 14then proceeds to send a SIP invite message to the next supplier, in thiscase Shaw. The process is repeated until one of the suppliers respondsindicating that it is available to carry the call. Once a supplierresponds indicating that it is able to carry the call, the suppliersends back to the call controller 14 an IP address for a gatewayprovided by the supplier through which the call or audio path of thecall will be carried. This IP address is sent in a message from the callcontroller 14 to the media relay 9 which responds with a messageindicating an IP address to which the caller telephone should send itsaudio/video, traffic and an IP address to which the gateway should sendits audio/video for the call. The call controller conveys the IP addressat which the media relay expects to receive audio/video from the callertelephone, to the caller telephone 12 in a message. The caller telephonereplies to the call controller with an IP address at which it would liketo receive audio/video and the call controller conveys that IP addressto the media relay. The call may then be conducted between the callerand callee through the media relay and gateway.

Referring back to FIG. 1, if the call controller 14 receives a routingmessage of the type shown in FIG. 32, and which has at least one callforwarding number and/or a voicemail number, the call controllerattempts to establish a call to the callee telephone 15 by seeking fromthe callee telephone a message indicating an IP address to which themedia relay should send audio/video. If no such message is received fromthe callee telephone, no call is established. If no call is establishedwithin a pre-determined time, the call controller 14 attempts toestablish a call with the next user identified in the call routingmessage in the same manner. This process is repeated until all callforwarding possibilities have been exhausted, in which case the callcontroller communicates with the voicemail server 19 identified in therouting message to obtain an IP address to which the media relay shouldsend audio/video and the remainder of the process mentioned above forestablishing IP addresses at the media relay 9 and the caller telephoneis carried out to establish audio/video paths to allowing the caller toleave a voicemail message with the voicemail server.

When an audio/video path through the media relay is established, a calltimer maintained by the call controller 14 logs the start date and timeof the call and logs the call ID and an identification of the route(i.e., audio/video path IP address) for later use in billing.

Time to Live

Referring to FIGS. 33A and 33B, a process for determining a time to livevalue for any of blocks 642 in FIG. 8C, 350 in FIG. 8A or 564 in FIG. 8Dabove is described. The process is executed by the processor 202 shownin FIG. 7. Generally, the process involves calculating a cost per unittime, calculating a first time value as a sum of a free time attributedto a participant in the communication session and the quotient of afunds balance held by the participant to the cost per unit time valueand producing a second time value in response to the first time valueand a billing pattern associated with the participant, the billingpattern including first and second billing intervals and the second timevalue being the time to permit a communication session to be conducted.

Referring to FIG. 33A, in this embodiment, the process begins with afirst block 700 that directs the RC processor to determine whether ornot the call type set at block 302 in FIG. 8A indicates the call is anetwork or cross-domain call. If the call is a network or cross-domaincall, block 702 of FIG. 33A directs the RC processor to set the time tolive equal to 99999 and the process is ended. Thus, the network orcross-domain call type has a long time to live. If at block 700 the calltype is determined not to be a network or cross-domain type, block 704directs the RC processor to get a subscriber bundle table record fromthe database 18 in FIG. 1 and store it locally in the subscriber bundlerecord buffer at the RC 14.

Referring to FIG. 34, a subscriber bundle table record is showngenerally at 706. The record includes a user name field 708 and aservices field 710. The user name field 708 holds a code identifying thesubscriber user name and the services field 710 holds codes identifyingservice features assigned to the subscriber, such as free local calling,call blocking and voicemail, for example.

FIG. 35 shows an exemplary subscriber bundle record for the Vancouvercaller. In this record the user name field 708 is loaded with the username 2001 1050 8667 and the services field 710 is loaded with codes 10,14 and 16 corresponding to free local calling, call blocking andvoicemail, respectively. Thus, user 2001 1050 8667 has free localcalling, call blocking and voicemail features.

Referring back to FIG. 33A, after having loaded a subscriber bundlerecord into the subscriber bundle record buffer, block 712 directs theRC processor to search the database (18) determine whether or not thereis a bundle override table record for the master list ID value that wasdetermined at block 410 in FIG. 8B. An exemplary bundle override tablerecord is shown at 714 in FIG. 36. The bundle table record includes amaster list ID field 716, an override type field 718, an override valuefield 720 a first interval field 722 and a second interval field 724.The master list ID field 716 holds a master list ID code. The overridetype field 718 holds an override type code indicating a fixed, percentor cent amount to indicate the amount by which a fee will be increased.The override value field 720 holds a real number representing the valueof the override type. The first interval field 722 holds a valueindicating the minimum number of seconds for a first level of chargingand the second interval field 724 holds a number representing a secondlevel of charging.

Referring to FIG. 37, a bundle override record for the located masterlist ID code is shown generally at 726 and includes a master list IDfield 716 holding the code 1019 which was the code located in block 410of FIG. 8B. The override type field 718 includes a code indicating theoverride type is a percentage value and the override value field 720holds the value 10.0 indicating that the override will be 10.0% of thecharged value. The first interval field 722 holds a value representing30 seconds and the second interval field 724 holds a value representing6 seconds. The 30 second value in the first interval field 722 indicatesthat charges for the route will be made at a first rate for 30 secondsand thereafter the charges will be made at a different rate inincrements of 6 seconds, as indicated by the contents of the secondinterval field 724.

Referring back to FIG. 33A, if at block 712 the processor finds a bundleoverride record of the type shown in FIG. 37, block 728 directs theprocessor to store the bundle override record in local memory. In theembodiment shown, the bundle override record shown in FIG. 37 is storedin the bundle override record buffer at the RC as shown in FIG. 7. Stillreferring to FIG. 33A, block 730 then directs the RC processor todetermine whether or not the subscriber bundle table record 706 in FIG.35 has a services field including a code identifying that the user isentitled to free local calling and also directs the processor todetermine whether or not the call type is not a cross domain cell, i.e.it is a local or local/national style. If both of these conditions aresatisfied, block 732 directs the processor to set the time to live equalto 99999, giving the user a long period of time for the call. Theprocess is then ended. If the conditions associated with block 730 arenot satisfied, block 734 of FIG. 33B directs the RC processor toretrieve a subscriber account record associated with a participant inthe call. This is done by copying and storing in the subscriber accountrecord buffer a subscriber account record for the caller.

Referring to FIG. 38, an exemplary subscriber account table record isshown generally at 736. The record includes a user name field 738, afunds balance field 740 and a free time field 742. The user name field738 holds a subscriber user name, the funds balance field 740 holds areal number representing the dollar value of credit available to thesubscriber and the free time field 742 holds an integer representing thenumber of free seconds that the user is entitled to.

An exemplary subscriber account record for the Vancouver caller is showngenerally at 744 in FIG. 39, wherein the user name field 738 holds theuser name 2001 1050 8667, the funds balance field 740 holds the value$10.00, and the free time field 742 holds the value 100. The fundsbalance field holding the value of $10.00 indicates the user has $10.00worth of credit and the free time field having the value of 100indicates that the user has a balance of 100 free seconds of call time.

Referring back to FIG. 33B, after copying and storing the subscriberaccount record shown in FIG. 39 from the database to the subscriberaccount record buffer RC, block 746 directs the processor to determinewhether or not the subscriber account record funds balance field 740 orfree time field 742 are greater than zero. If they are not greater thanzero, block 748 directs the processor to set the time to live equal tozero and the process is ended. The RC then sends a message back to thecall controller to cause the call controller to deny the call to thecaller. If the conditions associated with block 746 are satisfied, block750 directs the processor to calculate the call cost per unit time. Aprocedure for calculating the call cost per unit time is described belowin connection with FIG. 41.

Assuming the procedure for calculating the cost per second returns anumber representing the call cost per second, block 752 directs theprocessor 202 in FIG. 7 to determine whether or not the cost per secondis equal to zero. If so, block 754 directs the processor to set the timeto live to 99999 to give the caller a very long length of call and theprocess is ended.

If at block 752 the call cost per second is not equal to zero, block 756directs the processor 202 in FIG. 7 to calculate a first time to livevalue as a sum of a free time attributed to the participant in thecommunication session and the quotient of the funds balance held by theparticipant to the cost per unit time value. To do this, the processor202 of FIG. 7 is directed to set a first time value or temporary time tolive value equal to the sum of the free time provided in the free timefield 742 of the subscriber account record shown in FIG. 39 and thequotient of the contents of the funds balance field 740 in thesubscriber account record for the call shown in FIG. 39 and the cost persecond determined at block 750 of FIG. 33B. Thus, for example, if atblock 750 the cost per second is determined to be three cents per secondand the funds balance field holds the value $10.00, the quotient of thefunds balance and cost per second is 333 seconds and this is added tothe contents of the free time field 742, which is 100, resulting in atime to live of 433 seconds.

Block 758 then directs the RC processor to produce a second time valuein response to the first time value and the billing pattern associatedwith the participant as established by the bundle override record shownin FIG. 37. This process is shown in greater detail at 760 in FIG. 40and generally involves producing a remainder value representing aportion of the second billing interval remaining after dividing thesecond billing interval into a difference between the first time valueand the first billing interval.

Referring to FIG. 40, the process for producing the second time valuebegins with a first block 762 that directs the processor 202 in FIG. 7to set a remainder value equal to the difference between the time tolive value calculated at block 756 in FIG. 33B and the contents of thefirst interval field 722 of the record shown in FIG. 37, multiplied bythe modulus of the contents of the second interval field 724 of FIG. 37.Thus, in the example given, the difference between the time to livefield and the first interval field is 433 minus 30, which is 403 andtherefore the remainder produced by the mod of 403 divided by 6 is 0.17.Block 764 then directs the processor to determine whether or not thisremainder value is greater than zero and, if so, block 766 directs theprocessor to subtract the remainder from the first time value and setthe difference as the second time value. To do this the processor isdirected to set the time to live value equal to the current time to liveof 403 minus the remainder of 1, i.e., 402 seconds. The processor isthen returned back to block 758 of FIG. 33B.

Referring back to FIG. 40, if at block 764 the remainder is not greaterthan zero, block 768 directs the processor 202 of FIG. 7 to determinewhether or not the time to live is less than the contents of the firstinterval field 722 in the record shown in FIG. 37. If so, then block 770of FIG. 40 directs the processor to set the time to live equal to zero.Thus, the second time value is set to zero when the remainder is greaterthan zero and the first time value is less than the free time associatedwith the participant in the call. If at block 768 the conditions of thatblock are not satisfied, the processor returns the first time to livevalue as the second time to live value.

Thus, referring to FIG. 33B, after having produced a second time to livevalue, block 772 directs the processor to set the time to live value foruse in blocks 342, 350 or 564.

Cost per Second

Referring back to FIG. 33B, at block 750 it was explained that a callcost per unit time is calculated. The following explains how that callcost per unit time value is calculated.

Referring to FIG. 41, a process for calculating a cost per unit time isshown generally at 780. The process is executed by the processor 202 inFIG. 7 and generally involves locating a record in a database, therecord comprising a markup type indicator, a markup value and a billingpattern and setting a reseller rate equal to the sum of the markup valueand the buffer rate, locating at least one of an override recordspecifying a route cost per unit time amount associated with a routeassociated with the communication session, a reseller record associatedwith a reseller of the communications session, the reseller recordspecifying a reseller cost per unit time associated with the resellerfor the communication session and a default operator markup recordspecifying a default cost per unit time and setting as the cost per unittime the sum of the reseller rate and at least one of the route cost perunit time, the reseller cost per unit time and the default cost per unittime.

The process begins with a first set of blocks 782, 802 and 820 whichdirect the processor 202 in FIG. 7 to locate at least one of a recordassociated with a reseller and a route associated with the reseller, arecord associated with the reseller, and a default reseller mark-uprecord. Block 782, in particular, directs the processor to address thedatabase 18 to look for a record associated with a reseller and a routewith the reseller by looking for a special rate record based on themaster list ID established at block 410 in FIG. 8C.

Referring to FIG. 42, a system operator special rate table record isshown generally at 784. The record includes a reseller field 786, amaster list ID field 788, a mark-up type field 790, a mark-up valuefield 792, a first interval field 794 and a second interval field 796.The reseller field 786 holds a reseller ID code and the master list IDfield 788 holds a master list ID code. The mark-up type field 790 holdsa mark-up type such as fixed percent or cents and the mark-up valuefield 792 holds a real number representing the value corresponding tothe mark-up type. The first interval field 794 holds a numberrepresenting a first level of charging and the second interval field 796holds a number representing a second level of charging.

An exemplary system operator special rate table for a reseller known as“Klondike” is shown at 798 in FIG. 43. In this record, the resellerfield 786 holds a code indicating the retailer ID is Klondike, themaster list ID field 788 holds the code 1019 to associate the recordwith the master list ID code 1019. The mark-up type field 790 holds acode indicating the mark-up type is cents and the mark-up value field792 holds a mark-up value indicating 1/10 of one cent. The firstinterval field 794 holds the value 30 and the second interval field 796holds the value 6, these two fields indicating that the operator allows30 seconds for free and then billing is done in increments of 6 secondsafter that.

Referring back to FIG. 41, if at block 782 a record such as the oneshown in FIG. 43 is located in the system operator special rates table,the processor is directed to block 800 in FIG. 41. If such a record isnot found in the system operator special rates table, block 802 directsthe processor to address the database 18 to look in a system operatormark-up table for a mark-up record associated with the reseller.

Referring to FIG. 44, an exemplary system operator mark-up table recordis shown generally at 804. The record includes a reseller field 806, amark-up type field 808, a mark-up value field 810, a first intervalfield 812 and a second interval field 814. The reseller mark-up type,mark-up value, first interval and second interval fields are asdescribed in connection with the fields by the same names in the systemoperator special rates table shown in FIG. 42.

FIG. 45 provides an exemplary system operator mark-up table record forthe reseller known as Klondike and therefore the reseller field 806holds the value “Klondike”, the mark-up type field 808 holds the valuecents, the markup value field holds the value 0.01, the first intervalfield 812 holds the value 30 and the second interval field 814 holds thevalue 6. This indicates that the reseller “Klondike” charges by the centat a rate of one cent per minute. The first 30 seconds of the call arefree and billing is charged at the rate of one cent per minute inincrements of 6 seconds.

FIG. 46 provides an exemplary system operator mark-up table record forcases where no specific system operator mark-up table record exists fora particular reseller, i.e., a default reseller mark-up record. Thisrecord is similar to the record shown in FIG. 45 and the reseller field806 holds the value “all”, the mark-up type field 808 is loaded with acode indicating mark-up is based on a percentage, the mark-up valuefield 810 holds the percentage by which the cost is marked up, and thefirst and second interval fields 812 and 814 identify first and secondbilling levels.

Referring back to FIG. 41 , if at block 802 a specific mark-up recordfor the reseller identified at block 782 is not located, block 820directs the processor to get the mark-up record shown in FIG. 46, havingthe “all” code in the reseller field 806. The processor is then directedto block 800.

Referring back to FIG. 41, at block 800, the processor 202 of FIG. 7 isdirected to set a reseller rate equal to the sum of the mark-up value ofthe record located by blocks 782, 802 or 820 and the buffer ratespecified by the contents of the buffer rate field 516 of the masterlist record shown in FIG. 20. To do this, the RC processor sets avariable entitled “reseller cost per second” to a value equal to the sumof the contents of the mark-up value field (792, 810) of the associatedrecord, plus the contents of the buffer rate field (516) from the masterlist record associated with the master list ID. Then, block 822 directsthe processor to set a system operator cost per second variable equal tothe contents of the buffer rate field (516) from the master list record.Block 824 then directs the processor to determine whether the call typeflag indicates the call is local or national/local style and whether thecaller has free local calling. If both these conditions are met, thenblock 826 sets the user cost per second variable equal to zero and setstwo increment variables equal to one, for use in later processing. Thecost per second has thus be calculated and the process shown in FIG. 41is ended.

If at block 824 the conditions of that block are not met, the processor202 of FIG. 7 is directed to locate at least one of a bundle overridetable record specifying a route cost per unit time associated with aroute associated with the communication session, a reseller specialdestinations table record associated with a reseller of thecommunications session, the reseller record specifying a reseller costper unit time associated with the reseller for the communication sessionand a default reseller global markup record specifying a default costper unit time.

To do this block 828 directs the processor 202 of FIG. 7 to determinewhether or not the bundle override record 726 in FIG. 37 located atblock 712 in FIG. 33A has a master list ID equal to the stored masterlist ID that was determined at block 410 in FIG. 8B. If not, block 830directs the processor to find a reseller special destinations tablerecord in a reseller special destinations table in the database (18),having a master list ID code equal to the master list ID code of themaster list ID that was determined at block 410 in FIG. 8B. An exemplaryreseller special destinations table record is shown in FIG. 47 at 832.The reseller special destinations table record includes a reseller field834, a master list ID field 836, a mark-up type field 838, a mark-upvalue field 840, a first interval field 842 and a second interval field844. This record has the same format as the system operator specialrates table record shown in FIG. 42, but is stored in a different tableto allow for different mark-up types and values and time intervals to beset according to resellers' preferences. Thus, for example, an exemplaryreseller special destinations table record for the reseller “Klondike”is shown at 846 in FIG. 48. The reseller field 834 holds a valueindicating the reseller as the reseller “Klondike” and the master listID field holds the code 1019. The markup type field 838 holds a codeindicating the mark-up type is percent and the mark-up value field 840holds a number representing the mark-up value as 5%. The first andsecond interval fields identify different billing levels used asdescribed earlier.

Referring back to FIG. 41, the record shown in FIG. 48 may be located atblock 830, for example. If at block 830 such a record is not found, thenblock 832 directs the processor to get a default operator global mark-uprecord based on the reseller ID.

Referring to FIG. 49, an exemplary default reseller global mark-up tablerecord is shown generally at 848. This record includes a reseller field850, a mark-up type field 852, a mark-up value field 854, a firstinterval field 856 and a second interval field 858. The reseller field850 holds a code identifying the reseller. The mark-up type field 852,the mark-up value field 854 and the first and second interval fields 856and 858 are of the same type as described in connection with fields ofthe same name in FIG. 47, for example. The contents of the fields ofthis record 860 may be set according to system operator preferences, forexample.

Referring to FIG. 50, an exemplary reseller global mark-up table recordis shown generally at 860. In this record, the reseller field 850 holdsa code indicating the reseller is “Klondike”, the mark-up type field 852holds a code indicating the mark-up type is percent, the mark-up valuefield 854 holds a value representing 10% as the mark-up value, the firstinterval field 856 holds the value 30 and the second interval field 858holds the values 30 and 6 respectively to indicate the first 30 secondsare free and billing is to be done in 6 second increments after that.

Referring back to FIG. 41, should the processor get to block 832, thereseller global mark-up table record as shown in FIG. 50 is retrievedfrom the database and stored locally at the RC. As seen in FIG. 41, itwill be appreciated that if the conditions are met in blocks 828 or 830,or if the processor executes block 832, the processor is then directedto block 862 which causes it to set an override value equal to thecontents of the mark-up value field of the located record, to set thefirst increment variable equal to the contents of the first intervalfield of the located record and to set the second increment variableequal to the contents of the second interval field of the locatedrecord. (The increment variables were alternatively set to specificvalues at block 826 in FIG. 41.)

It will be appreciated that the located record could be a bundleoverride record of the type shown in FIG. 37 or the located record couldbe a reseller special destination record of the type shown in FIG. 48 orthe record could be a reseller global mark-up table record of the typeshown in FIG. 50. After the override and first and second incrementvariables have been set at block 862, the processor 202 if FIG. 7 isdirected to set as the cost per unit time the sum of the reseller rateand at least one of the route cost per unit time, the reseller cost perunit time and the default cost per unit time, depending on which recordwas located. To do this, block 864 directs the processor to set the costper unit time equal to the sum of the reseller cost set at block 800 inFIG. 41, plus the contents of the override variable calculated in block862 in FIG. 41. The cost per unit time has thus been calculated and itis this cost per unit time that is used in block 752 of FIG. 33B, forexample.

Terminating the Call

In the event that either the caller or the callee terminates a call, thetelephone of the terminating party sends a SIP bye message to thecontroller 14. An exemplary SIP bye message is shown at 900 in FIG. 51and includes a caller field 902, a callee field 904 and a call ID field906. The caller field 902 holds a twelve digit user name, the calleefield 904 holds a PSTN compatible number or user name, and the call IDfield 906 holds a unique call identifier field of the type shown in thecall ID field 65 of the SIP invite message shown in FIG. 3.

Thus, for example, referring to FIG. 52, a SIP bye message for theCalgary callee is shown generally at 908 and the caller field 902 holdsa user name identifying the caller, in this case 2001 1050 8667, thecallee field 904 holds a user name identifying the Calgary callee, inthis case 2001 1050 2222, and the call ID field 906 holds the codeFA10@192.168.0.20, which is the call ID for the call.

The SIP bye message shown in FIG. 52 is received at the call controller14 and the call controller executes a process as shown generally at 910in FIG. 53. The process includes a first block 912 that directs the callcontroller processor 202 of FIG. 7 to copy the caller, callee and callID field contents from the SIP bye message received from the terminatingparty to corresponding fields of an RC stop message buffer (not shown).Block 914 then directs the processor to copy the call start time fromthe call timer and to obtain a call stop time from the call timer. Block916 then directs the call controller to calculate a communicationsession time by determining the difference in time between the callstart time and the call stop time. This session time is then stored in acorresponding field of the RC call stop message buffer. Block 917 thendirects the processor to decrement the contents of the currentconcurrent call field 277 of the dialing profile for the caller as shownin FIG. 10, to indicate that there is one less concurrent call inprogress. A copy of the amended dialing profile for the caller is thenstored in the database 18 of FIG. 1. Block 918 then directs theprocessor to copy the route from the call log. An RC call stop messageproduced as described above is shown generally at 1000 in FIG. 54. An RCcall stop message specifically associated with the call made to theCalgary callee is shown generally at 1020 in FIG. 55.

Referring to FIG. 54, the RC stop call message includes a caller field1002, callee field 1004, a call ID field 1006, an account start timefield 1008, an account stop time field 1010, a communication sessiontime 1012 and a route field 1014. The caller field 1002 holds ausername, the callee field 1004 holds a PSTN-compatible number or systemnumber, the call ID field 1006 hold the unique call identifier receivedfrom the SIP invite message shown in FIG. 3, the account start timefield 1008 holds the date and start time of the call, the account stoptime field 1010 holds the date and time the call ended, thecommunication session time field 1012 holds a value representing thedifference between the start time and the stop time, in seconds, and theroute field 1014 holds the IP address for the communications link thatwas established.

Referring to FIG. 55, an exemplary RC stop call message for the Calgarycallee is shown generally at 1020. In this example the caller field 1002holds the user name 2001 1050 8667 identifying the Vancouver-basedcaller and the callee field 1004 holds the user name 2001 1050 2222identifying the Calgary callee. The contents of the call ID field 1006are FA10@192.168.0.20. The contents of the account start time field 1008are Dec. 30, 2006 12:12:12 and the contents of the account stop timefield are Dec. 30, 2006 12:12:14. The contents of the communicationsession time field 1012 are 2 to indicate 2 seconds call duration andthe contents of the route field are 72.64.39.58.

Referring back to FIG. 53, after having produced an RC call stopmessage, block 920 directs the processor 202 in FIG. 7 to send the RCstop message compiled in the RC call stop message buffer to the RC 16 ofFIG. 1. Block 922 directs the call controller 14 to send a “bye” messageback to the party that did not terminate the call.

The RC 16 of FIG. 1 receives the call stop message and an RC call stopmessage process is invoked at the RC, the process being shown at 950 inFIGS. 56A, 56B and 56C. Referring to FIG. 56A, the RC stop messageprocess 950 begins with a first block 952 that directs the processor 202in FIG. 7 to determine whether or not the communication session time isless than or equal to the first increment value set by the costcalculation routine shown in FIG. 41, specifically blocks 826 or 862thereof. If this condition is met, then block 954 of FIG. 56A directsthe RC processor to set a chargeable time variable equal to the firstincrement value set at block 826 or 862 of FIG. 41. If at block 952 ofFIG. 56A the condition is not met, block 956 directs the RC processor toset a remainder variable equal to the difference between thecommunication session time and the first increment value mod the secondincrement value produced at block 826 or 862 of FIG. 41. Then, theprocessor is directed to block 958 of FIG. 56A which directs it todetermine whether or not the remainder is greater than zero. If so,block 960 directs the RC processor to set the chargeable time variableequal to the difference between the communication session time and theremainder value. If at block 958 the remainder is not greater than zero,block 962 directs the RC processor to set the chargeable time variableequal to the contents of the communication session time from the RC stopmessage. The processor is then directed to block 964. In addition, afterexecuting block 954 or block 960, the processor is directed to block964.

Block 964 directs the processor 202 of FIG. 7 to determine whether ornot the chargeable time variable is greater than or equal to the freetime balance as determined from the free time field 742 of thesubscriber account record shown in FIG. 39. If this condition issatisfied, block 966 of FIG. 56A directs the processor to set the freetime field 742 in the record shown in FIG. 39, to zero. If thechargeable time variable is not greater than or equal to the free timebalance, block 968 directs the RC processor to set a user cost variableto zero and Block 970 then decrements the free time field 742 of thesubscriber account record for the caller by the chargeable time amountdetermined by block 954, 960 or 962.

If at Block 964 the processor 202 of FIG. 7 was directed to Block 966which causes the free time field (742 of FIG. 39) to be set to zero,referring to FIG. 56B, Block 972 directs the processor to set aremaining chargeable time variable equal to the difference between thechargeable time and the contents of the free time field (742 of FIG.39). Block 974 then directs the processor to set the user cost variableequal to the product of the remaining chargeable time and the cost persecond calculated at Block 750 in FIG. 33B. Block 976 then directs theprocessor to decrement the funds balance field (740) of the subscriberaccount record shown in FIG. 39 by the contents of the user costvariable calculated at Block 974.

After completing Block 976 or after completing Block 970 in FIG. 56A,block 978 of FIG. 56B directs the processor 202 of FIG. 7 to calculate areseller cost variable as the product of the reseller rate as indicatedin the mark-up value field 810 of the system operator mark-up tablerecord shown in FIG. 45 and the communication session time determined atBlock 916 in FIG. 53. Then, Block 980 of FIG. 56B directs the processorto add the reseller cost to the reseller balance field 986 of a reselleraccount record of the type shown in FIG. 57 at 982.

The reseller account record includes a reseller ID field 984 and theaforementioned reseller balance field 986. The reseller ID field 984holds a reseller ID code, and the reseller balance field 986 holds anaccumulated balance of charges.

Referring to FIG. 58, a specific reseller accounts record for thereseller “Klondike” is shown generally at 988. In this record thereseller ID field 984 holds a code representing the reseller “Klondike”and the reseller balance field 986 holds a balance of $100.02. Thus, thecontents of the reseller balance field 986 in FIG. 58 are incremented bythe reseller cost calculated at block 978 of FIG. 56B.

Still referring to FIG. 56B, after adding the reseller cost to thereseller balance field as indicated by Block 980, Block 990 directs theprocessor to 202 of FIG. 7 calculate a system operator cost as theproduct of the system operator cost per second, as set at block 822 inFIG. 41, and the communication session time as determined at Block 916in FIG. 53. Block 992 then directs the processor to add the systemoperator cost value calculated at Block 990 to a system operatoraccounts table record of the type shown at 994 in FIG. 59. This recordincludes a system operator balance field 996 holding an accumulatedcharges balance. Referring to FIG. 60 in the embodiment described, thesystem operator balance field 996 may hold the value $1,000.02 forexample, and to this value the system operator cost calculated at Block990 is added when the processor executes Block 992 of FIG. 56B.

Ultimately, the final reseller balance 986 in FIG. 58 holds a numberrepresenting an amount owed to the reseller by the system operator andthe system operator balance 996 of FIG. 59 holds a number representingan amount of profit for the system operator.

While specific embodiments of the invention have been described andillustrated, such embodiments should be considered illustrative of theinvention only and not as limiting the invention as construed inaccordance with the accompanying claims.

What is claimed is:
 1. A computer implemented process for attributingcharges for communications services, the process comprising: causing aprocessor to determine a first chargeable time in response to acommunication session time and a pre-defined billing pattern; causingthe processor to determine a user cost value in response to the firstchargeable time and a free time value associated with a user of thecommunications services; causing the processor to change an accountbalance associated with the user in response to the user cost value;causing the processor to change an account balance associated with areseller of the communications services in response to a reseller costper unit time and the communication session time; and causing theprocessor to change an account balance associated with an operator ofthe communications services in response to an operator cost per unittime and the communication session time.
 2. The process of claim 1,wherein determining the first chargeable time comprises: causing theprocessor to locate at least one of: an override record specifying abilling pattern associated with a route associated with thecommunication session; a reseller record associated with a reseller ofthe communications session, the reseller record specifying a billingpattern associated with the reseller for the communication session; anda default record specifying a billing pattern; and causing the processorto set as the pre-defined billing pattern the billing pattern of thelocated record, wherein the billing pattern of the located recordcomprises a first billing interval and a second billing interval.
 3. Theprocess of claim 2, wherein determining the first chargeable timecomprises causing the processor to set the first chargeable time equalto the first billing interval when the communication session time isless than or equal to the first billing interval.
 4. The process ofclaim 2, wherein determining the first chargeable time comprises causingthe processor to produce a remainder value representing a portion of thesecond billing interval remaining after dividing the second billinginterval into a difference between the communication session time andthe first billing interval when the communication session time isgreater than the communication session time; and setting the firstchargeable time to a difference between the communication session timeand the remainder when the remainder is greater than zero; and settingthe first chargeable time to the communication session time when theremainder is not greater than zero.
 5. The process of claim 4, furthercomprising causing the processor to set the free time value to zero whenthe first chargeable time is greater than or equal to the free timevalue.
 6. The process of claim 4, further comprising causing theprocessor to set the user cost to zero when the first chargeable time isless than the free time value.
 7. The process of claim 6, furthercomprising causing the processor to change a user free time balance inresponse to the first chargeable time.
 8. The process of claim 5,further comprising causing the processor to determine a remainingchargeable time by determining a difference between the first chargeabletime and the free time value.
 9. The process of claim 8, whereinchanging an account balance associated with the user comprises causingthe processor to calculate the user cost value in response to theremaining chargeable time and a user cost per unit time.
 10. The processof claim 9, further comprising causing the processor to change a userfunds balance associated with the user in response to the user costvalue.
 11. The process of claim 1, further comprising determining thereseller cost per unit time by: locating at least one route recordspecifying a buffer rate for use of a route used in providing thecommunications services; locating a record associated with the resellerspecifying a reseller markup rate; and determining the reseller cost perunit time in response to the buffer rate and the reseller markup rate.12. The process of claim 11, further comprising determining the operatorcost per unit time by setting the buffer rate as the operator cost perunit time.
 13. A computer-implemented process for attributing chargesfor communications services, the process comprising initiating theprocess of claim 1, in response to termination of a communicationsession.
 14. A non-transitory computer readable medium encoded withinstructions for directing a processor circuit to execute the process ofclaim
 1. 15. An apparatus for attributing charges for communicationsservices, the apparatus comprising: a processor operably configured toreceive signals representing a communication session time, a pre-definedbilling pattern, a free time value associated with a user of thecommunications services, a reseller cost per unit time; and an operatorcost per unit time; a non-transitory computer readable medium encodedwith codes for directing the processor to: receive the signalsrepresenting the communication session time, the pre-defined billingpattern, the free time value associated with a user of thecommunications services, the reseller cost per unit time, and theoperator cost per unit time; determine a first chargeable time inresponse to the communication session time and the pre-defined billingpattern; determine a user cost value in response to the first chargeabletime and the free time value; cause an account balance associated withthe user to be changed in response to the user cost value; cause anaccount balance associated with a reseller of the communicationsservices in response to the reseller cost per unit time and thecommunication session time; and cause an account balance associated withan operator of the communications services to be changed in response tothe operator cost per unit time and the communication session time. 16.The apparatus of claim 15, wherein the codes include codes for directingthe processor to determine the first chargeable time by: causing theprocessor to locate at least one of: an override record specifying abilling pattern associated with a route associated with thecommunication session; a reseller record associated with a reseller ofthe communications session, the reseller record specifying a billingpattern associated with the reseller for the communication session; anda default record specifying a billing pattern; and causing the processorto set as the pre-defined billing pattern the billing pattern of thelocated record, wherein the billing pattern of the located recordcomprises a first billing interval and a second billing interval. 17.The apparatus of claim 16, wherein the codes for directing the processorto determine the first chargeable time comprise codes for causing theprocessor to set the first chargeable time equal to the first billinginterval when the communication session time is less than or equal tothe first billing interval.
 18. The apparatus of claim 16, wherein thecodes for directing the processor to determine the first chargeable timecomprise codes for causing the processor to produce a remainder valuerepresenting a portion of the second billing interval remaining afterdividing the second billing interval into a difference between thecommunication session time and the first billing interval when thecommunication session time is greater than the communication sessiontime; and codes for causing the processor to set the first chargeabletime to a difference between the communication session time and theremainder when the remainder is greater than zero; and codes for causingthe processor to set the first chargeable time to the communicationsession time when the remainder is not greater than zero.
 19. Theapparatus of claim 18, wherein the codes for directing the processorfurther comprise codes for causing the processor to set the free timevalue to zero when the first chargeable time is greater than or equal tothe free time value.
 20. The apparatus of claim 18, wherein the codesfor directing the processor further comprise codes for causing theprocessor to set the user cost to zero when the first chargeable time isless than the free time value.
 21. The apparatus of claim 20, whereinthe codes for directing the processor further comprise codes for causingthe processor to change a user free time balance in response to thefirst chargeable time.
 22. The apparatus of claim 19, wherein the codesfor directing the processor further comprise codes for causing theprocessor to determine a remaining chargeable time by determining adifference between the first chargeable time and the free time value.23. The apparatus of claim 22, wherein the codes for directing theprocessor to change an account balance associated with the user comprisecodes for directing the processor to cause the processor to calculatethe user cost value in response to the remaining chargeable time and auser cost per unit time.
 24. The apparatus of claim 23, wherein thecodes for directing the processor further comprise codes for causing theprocessor to change a user funds balance associated with the user inresponse to the user cost value.
 25. The apparatus of claim 15, furthercomprising codes for directing the processor to determine the resellercost per unit time by: locating at least one route record specifying abuffer rate for use of a route used in providing the communicationsservices; locating a record associated with the reseller specifying areseller markup rate; and determining the reseller cost per unit time inresponse to the buffer rate and the reseller markup rate.
 26. Theapparatus of claim 15, wherein the codes for directing the processorfurther comprise codes for causing the processor to determine theoperator cost per unit time by setting the buffer rate as the operatorcost per unit time.
 27. The apparatus of claim 15, wherein the codesinclude codes for directing the processor to receive a signal indicatingtermination of a communication session.
 28. An apparatus for attributingcharges for communications services, the apparatus comprising: means forreceiving signals representing a communication session time, apre-defined billing pattern, a free time value associated with a user ofthe communications services, a reseller cost per unit time; and anoperator cost per unit time; means for determining a first chargeabletime in response to the communication session time and the pre-definedbilling pattern; means for determining a user cost value in response tothe first chargeable time and the free time value; means for causing anaccount balance associated with the user to be changed in response tothe user cost value; means for causing an account balance associatedwith a reseller of the communications services in response to thereseller cost per unit time and the communication session time; andmeans for causing an account balance associated with an operator of thecommunications services to be changed in response to the operator costper unit time and the communication session time.
 29. The apparatus ofclaim 28, wherein the means for determining the first chargeable timeincludes: means for locating at least one of: an override recordspecifying a billing pattern associated with a route associated with thecommunication session; a reseller record associated with a reseller ofthe communications session, the reseller record specifying a billingpattern associated with the reseller for the communication session; anda default record specifying a billing pattern; and means for setting asthe pre-defined billing pattern the billing pattern of the locatedrecord, wherein the billing pattern of the located record comprises afirst billing interval and a second billing interval.
 30. The apparatusof claim 28, wherein means for determining the first chargeable timeincludes means for setting the first chargeable time equal to the firstbilling interval when the communication session time is less than orequal to the first billing interval.
 31. The apparatus of claim 28,wherein the means for determining the first chargeable time comprisesmeans for producing a remainder value representing a portion of thesecond billing interval remaining after dividing the second billinginterval into a difference between the communication session time andthe first billing interval when the communication session time isgreater than the communication session time; and further comprisingmeans for setting the first chargeable time to a difference between thecommunication session time and the remainder when the remainder isgreater than zero; and means for setting the first chargeable time tothe communication session time when the remainder is not greater thanzero.
 32. The apparatus of claim 31 further comprising means for settingthe free time value to zero when the first chargeable time is greaterthan or equal to the free time value.
 33. The apparatus of claim 31,further comprising setting the user cost to zero when the firstchargeable time is less than the free time value.
 34. The apparatus ofclaim 33, further comprising means for changing a user free time balancein response to the first chargeable time.
 35. The apparatus of claim 32,further comprising means for determining a remaining chargeable time bydetermining a difference between the first chargeable time and the freetime value.
 36. The apparatus of claim 35, wherein the means forchanging an account balance associated with the user includes means forcalculating the user cost value in response to the remaining chargeabletime and a user cost per unit time.
 37. The apparatus of claim 35,further comprising means for changing a user funds balance associatedwith the user in response to the user cost value.
 38. The apparatus ofclaim 28, further comprising means for determining the reseller cost perunit time by: locating at least one route record specifying a bufferrate for use of a route used in providing the communications services;locating a record associated with the reseller specifying a resellermarkup rate; and determining the reseller cost per unit time in responseto the buffer rate and the reseller markup rate.
 39. The apparatus ofclaim 38, further comprising means for determining the operator cost perunit time by setting the buffer rate as the operator cost per unit time.40. The apparatus of claim 28, further comprising means for receiving asignal indicating termination of a communication session.